[Zope] Repost: sequence.sort: how can I sort strings?

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Wed, 3 Apr 2002 12:34:32 +0400


On Wed, Apr 03, 2002 at 03:23:35PM +1200, Danny Adair wrote:
> (haven't figured it out yet, only workarounds...)
> 
> How can I sort a sequence of STRINGS using sequence.sort?
> I don't know what to use as a "key"...
> 
> (I tried self, str, value, '', _.None, ....... :-))
> 
> Or in other words: What's the attribute of a string that returns the string
> itself?

   Danny, you already asked the question few weeks ago, and I answered -
there is no such key. Don't use sequence.sort(), just put your strings into
a list (let us call it "alist") and call alist.sort().

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.