support keys in sorted_strings
This commit is contained in:
parent
c1a2bd4d3d
commit
3f6547f28f
1 changed files with 2 additions and 2 deletions
|
@ -555,5 +555,5 @@ def sort_string(string):
|
|||
string = re.sub('(\d+)', lambda x: '%010d' % int(x.group(0)), string)
|
||||
return unicodedata.normalize('NFKD', string)
|
||||
|
||||
def sorted_strings(strings):
|
||||
return sorted(strings, cmp=lambda a, b: cmp(sort_string(a), sort_string(b)))
|
||||
def sorted_strings(strings, keys=None):
|
||||
return sorted(strings, cmp=lambda a, b: cmp(sort_string(a), sort_string(b)), keys=keys)
|
||||
|
|
Loading…
Reference in a new issue