mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Remove a use of list.sort(cmp=) to silence a -3 DeprecationWarning in
cookielib.
This commit is contained in:
parent
60fffcf854
commit
52f03c5d20
1 changed files with 1 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue