Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ea56710c
Commit
ea56710c
authored
Apr 14, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5341: fix typo and adapt docstring syntax.
parent
4fabac54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/functools.py
Lib/functools.py
+2
-2
No files found.
Lib/functools.py
View file @
ea56710c
...
...
@@ -51,7 +51,7 @@ def wraps(wrapped,
assigned
=
assigned
,
updated
=
updated
)
def
total_ordering
(
cls
):
'Class decorator that fills-in missing ordering methods'
"""Class decorator that fills in missing ordering methods"""
convert
=
{
'__lt__'
:
[(
'__gt__'
,
lambda
self
,
other
:
other
<
self
),
(
'__le__'
,
lambda
self
,
other
:
not
other
<
self
),
...
...
@@ -78,7 +78,7 @@ def total_ordering(cls):
return
cls
def
cmp_to_key
(
mycmp
):
'Convert a cmp= function into a key= function'
"""Convert a cmp= function into a key= function"""
class
K
(
object
):
def
__init__
(
self
,
obj
,
*
args
):
self
.
obj
=
obj
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment