[Zope-dev] case insensitive sorts
Steve Alexander
steve@cat-box.net
Fri, 08 Dec 2000 13:15:08 +0000
Shane Hathaway wrote:
>
> BTW have you ever tried this?
>
> data = [[], (), 0, '', {}]
> data.sort()
> print data
>
> The one thing I wonder is whether the sort order is consistent between
> different versions of Python. I get:
>
> [0, {}, [], '', ()]
This is consistent across Python versions. The sequence types are in
alphabetical order:
Dictionary, List, String, Tuple
This is documented somewhere.
--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net