fixed 2.0 compat bug

This commit is contained in:
Just van Rossum 2000-10-20 06:34:57 +00:00
parent 860106ae90
commit 6508c7c7e8

View file

@ -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