On 9/16/09 15:51 , Igor Mavrović - ma...@irb wrote:
Hi,

I know about the use of locale module:

import locale
locale.setlocale(locale.LC_ALL, "hr_HR.UTF8")
print sorted(words, key=locale.strxfrm)

but I have specific and complicated data structure (list of lists
containing strings, tuples and dictionaries) due to LDAP search result
data.
So I use the 'key' option to get to the neaded attributes, and can't use
it for the locale setting. How can I sort this monster list by attribute
values inside it, and still get the correct sorting order?

Wrap the keys in a zope.ucol instance should do the trick.

Wichert.
_______________________________________________
Python-nl mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-nl

Antwoord per e-mail aan