[Zope-dev] case insensitive sorts

Shane Hathaway shane@digicool.com
Thu, 04 Jan 2001 09:41:15 -0500


Shane Hathaway wrote:
> def sort_strings(data):
>   sortable_data = list(map(lambda s: (lower(s), s), data))
>   sortable_data.sort()
>   return map(lambda s: s[1], sortable_data)

... Or better, you could pass a comparison function to sort() like Tres
suggested.  :-)

Shane