On 2006-10-17, Ron Adam <[EMAIL PROTECTED]> wrote: > Neil Cerutti wrote: >> On 2006-10-16, Ron Adam <[EMAIL PROTECTED]> wrote: >>> I have several applications where I want to sort lists in >>> alphabetical order. Most examples of sorting usually sort on >>> the ord() order of the character set as an approximation. >>> But that is not always what you want. >> >> Check out strxfrm in the locale module. > > It looks to me this would be a good candidate for a > configurable class. Something preferably in the string module > where it could be found easier. > > Is there anyway to change the behavior of strxfrm or strcoll? > For example have caps before lowercase, instead of after?
You can probably get away with writing a strxfrm function that spits out numbers that fit your definition of sorting. -- Neil Cerutti Whenever I see a homeless guy, I always run back and give him money, because I think: Oh my God, what if that was Jesus? --Pamela Anderson -- http://mail.python.org/mailman/listinfo/python-list