diff options
| author | Raymond Hettinger <python@rcn.com> | 2011-03-22 00:54:04 (GMT) |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 00:54:04 (GMT) |
| commit | 0a4edd5435d30e49958b1c1e433ea3b4aa8da324 (patch) | |
| tree | b05a3c2647954651543213940c8ddb6c74097eb1 | |
| parent | 9c61e24be47d27941ebd5c639fa3fce47e26f00b (diff) | |
| parent | a0d1d96771f41e24c1c369ef8b10e5a8f7d6c36a (diff) | |
| download | cpython-0a4edd5435d30e49958b1c1e433ea3b4aa8da324.zip cpython-0a4edd5435d30e49958b1c1e433ea3b4aa8da324.tar.gz cpython-0a4edd5435d30e49958b1c1e433ea3b4aa8da324.tar.bz2 | |
Issue #11628: cmp_to_key should use __slots__.
| -rw-r--r-- | Lib/functools.py | 1 | ||||
| -rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index fdc9c79..3bffbac 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): @@ -84,6 +84,8 @@ Library - Issue #11371: Mark getopt error messages as localizable. Patch by Filip GruszczyĆski. +- Issue #11628: cmp_to_key generated class should use __slots__ + - Issue #5537: Fix time2isoz() and time2netscape() functions of httplib.cookiejar for expiration year greater than 2038 on 32-bit systems. |
