diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-30 20:15:17 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-30 20:15:17 (GMT) |
commit | 70b64fce96e894dfa8af5afd1f8b3fe863ba16e0 (patch) | |
tree | 15d549753edea1f11c0a3990ea0419426220c445 /Lib/cookielib.py | |
parent | 4f066126d616d35aa8c0911a915ad64a09aaf16e (diff) | |
download | cpython-70b64fce96e894dfa8af5afd1f8b3fe863ba16e0.zip cpython-70b64fce96e894dfa8af5afd1f8b3fe863ba16e0.tar.gz cpython-70b64fce96e894dfa8af5afd1f8b3fe863ba16e0.tar.bz2 |
Issue #1771: Remove cmp parameter from list.sort() and builtin.sorted().
Diffstat (limited to 'Lib/cookielib.py')
-rw-r--r-- | Lib/cookielib.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/cookielib.py b/Lib/cookielib.py index 4552412..ee31f46 100644 --- a/Lib/cookielib.py +++ b/Lib/cookielib.py @@ -1255,8 +1255,7 @@ class CookieJar: """ # add cookies in order of most specific (ie. longest) path first - def decreasing_size(a, b): return cmp(len(b.path), len(a.path)) - cookies.sort(decreasing_size) + cookies.sort(key=lambda a: len(a.path), reverse=True) version_set = False |