summaryrefslogtreecommitdiffstats
path: root/Lib/functools.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-04-04 21:45:01 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-04-04 21:45:01 (GMT)
commitbb006cf26cc41aefcddc8f06722c524826aacefa (patch)
tree5d0e82402052f188ea868cf94497eba52a7b38fd /Lib/functools.py
parent4f185228b084ee45ef822198762154457dc343db (diff)
downloadcpython-bb006cf26cc41aefcddc8f06722c524826aacefa.zip
cpython-bb006cf26cc41aefcddc8f06722c524826aacefa.tar.gz
cpython-bb006cf26cc41aefcddc8f06722c524826aacefa.tar.bz2
Add tests for cmp_to_key.
Adopt PEP 8 compliant function name. Factor-out existing uses cmp_to_key. Update documentation to use internal pointers instead of external resource.
Diffstat (limited to 'Lib/functools.py')
-rw-r--r--Lib/functools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/functools.py b/Lib/functools.py
index d31b090..ad1cccc 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -76,7 +76,7 @@ def total_ordering(cls):
setattr(cls, opname, opfunc)
return cls
-def CmpToKey(mycmp):
+def cmp_to_key(mycmp):
'Convert a cmp= function into a key= function'
class K(object):
def __init__(self, obj, *args):