[Tutor] Fw: utf locale sorting
Igor Mavrović - Maqui@IRB
igor.mavrovic at irb.hr
Fri Sep 18 14:52:10 CEST 2009
Excellent, the thing works!
Thanx a lot!
----- Original Message -----
From: Kent Johnson
To: Igor Mavrović - Maqui at IRB
Cc: Rich Lovely ; tutor at python.org
Sent: Wednesday, September 16, 2009 7:06 PM
Subject: Re: [Tutor] Fw: utf locale sorting
How about this (assuming both arguments need to be transformed)?
key=lambda x:(locale.strxfrm(x[0][1]["sn"]),
locale.strxfrm(x[0][1]["givenName"]))
Kent
__________ Information from ESET Smart Security, version of virus signature database 4429 (20090916) __________
The message was checked by ESET Smart Security.
http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090918/bf4eebaf/attachment.htm>
More information about the Tutor
mailing list