diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 00:50:28 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 00:50:28 (GMT) |
commit | a0d1d96771f41e24c1c369ef8b10e5a8f7d6c36a (patch) | |
tree | d8afb23aaed3e15c3c8fd1b45002d64d1a1f86b1 /Lib/functools.py | |
parent | 779a5b0b3aac6a5dcd8473f770e1573a48b51f7d (diff) | |
download | cpython-a0d1d96771f41e24c1c369ef8b10e5a8f7d6c36a.zip cpython-a0d1d96771f41e24c1c369ef8b10e5a8f7d6c36a.tar.gz cpython-a0d1d96771f41e24c1c369ef8b10e5a8f7d6c36a.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 03de69a..e92a2fc 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -96,6 +96,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): |