mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
fixed 2.0 compat bug
This commit is contained in:
parent
860106ae90
commit
6508c7c7e8
1 changed files with 1 additions and 1 deletions
|
@ -428,7 +428,7 @@ def caselesssort(alist):
|
|||
def tuple_caselesssort(items):
|
||||
try:
|
||||
tupledlist = map(lambda tuple, lower = string.lower: (lower(tuple[0]), tuple), items)
|
||||
except TypeError:
|
||||
except (AttributeError, TypeError):
|
||||
items = items[:]
|
||||
items.sort()
|
||||
return items
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue