Hmm... An idea: if a,b==c,d:

Brian Quinlan brian at sweetapp.com
Mon Nov 18 19:49:33 EST 2002


David wrote:
> Ok, so out of curiosity what does one have to do to get string
> comparisons done alphabetically instead of in ASCII collation
ordering?
> I tried looking in the Python Library Reference under strings and
> unicode (since one would want correct handling of accented chars) but
> didn't see anything.

String collation is locale dependant, so check out the locale module.
That being said, the locale module is evil so never use it :-)

Cheers,
Brian





More information about the Python-list mailing list