diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-08-03 22:34:25 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-08-03 22:34:25 +0000 |
commit | 52f03c5d20426abfd1105cc8b3f9408dddab0b13 (patch) | |
tree | 0cfc5296fb0bd5f99013163a2bba927a1343dfc0 | |
parent | 60fffcf854a14309149fb77a954a7b92d4d7958d (diff) | |
download | cpython-git-52f03c5d20426abfd1105cc8b3f9408dddab0b13.tar.gz |
Remove a use of list.sort(cmp=) to silence a -3 DeprecationWarning in
cookielib.
-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 b27f63caf1..9439b5c295 100644 --- a/Lib/cookielib.py +++ b/Lib/cookielib.py @@ -1258,8 +1258,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 arg: len(arg.path), reverse=True) version_set = False |