diff options
| author | Raymond Hettinger <python@rcn.com> | 2011-03-22 20:20:59 (GMT) | 
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 20:20:59 (GMT) | 
| commit | 911da479960a72db08154b237e8f5fd4b5ace2f4 (patch) | |
| tree | 997b5e811b48397ede18570ca8854fcb0223b997 /Lib/functools.py | |
| parent | 7250730afc4dbf570d5c41f56710527ed93ba071 (diff) | |
| download | cpython-911da479960a72db08154b237e8f5fd4b5ace2f4.zip cpython-911da479960a72db08154b237e8f5fd4b5ace2f4.tar.gz cpython-911da479960a72db08154b237e8f5fd4b5ace2f4.tar.bz2  | |
Issue #11628: cmp_to_key should use__slots__.
Diffstat (limited to 'Lib/functools.py')
| -rw-r--r-- | Lib/functools.py | 1 | 
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index 01889cb..53680b8 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -80,6 +80,7 @@ def total_ordering(cls):  def cmp_to_key(mycmp):      """Convert a cmp= function into a key= function"""      class K(object): +        __slots__ = ['obj']          def __init__(self, obj, *args):              self.obj = obj          def __lt__(self, other):  | 
