Use list comprehension: 108 + for index, part in enumerate(key): 109 + if part.isdigit(): 110 + key[index] = int(part) 111 + else: 112 + key[index] = get_local_key(part)
return [int(part) if part.isdigit() else get_local_key(part) for part in keys] Hm.. whats with memory usage then? Will "key" be a list with all strings to sort? -- https://code.launchpad.net/~m2j/openlp/bug-1094342/+merge/156292 Your team OpenLP Core is subscribed to branch lp:openlp. _______________________________________________ Mailing list: https://launchpad.net/~openlp-core Post to : [email protected] Unsubscribe : https://launchpad.net/~openlp-core More help : https://help.launchpad.net/ListHelp

