projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b0248e
)
cmp_sort_key: reference functools.cmp_to_key()
author
Zac Medico
<zmedico@gentoo.org>
Tue, 19 Mar 2013 06:22:32 +0000
(23:22 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Tue, 19 Mar 2013 06:22:32 +0000
(23:22 -0700)
pym/portage/util/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/__init__.py
b/pym/portage/util/__init__.py
index 32875695b81bc15af41eff89034e6acf400a9970..1736ad6480977771eeee1d8f852d6d0d1597464e 100644
(file)
--- a/
pym/portage/util/__init__.py
+++ b/
pym/portage/util/__init__.py
@@
-848,6
+848,9
@@
class cmp_sort_key(object):
list.sort(), making it easier to port code for python-3.0 compatibility.
It works by generating key objects which use the given cmp function to
implement their __lt__ method.
+
+ Beginning with Python 2.7 and 3.2, equivalent functionality is provided
+ by functools.cmp_to_key().
"""
__slots__ = ("_cmp_func",)