Sort comprehensions? (Re: longest sequence)

cribeiro at mail.inet.com.br cribeiro at mail.inet.com.br
Tue Feb 18 21:46:42 EST 2003


[Greg]
> Maybe list comprehensions should have a sorting clause:
>
>    [x for x in stuff sortedby x.key]

It seems too much 'SQL-ish' IMHO. But it would be useful, in a way... but
probably it's not worth changing the language. (After PEP-308 I've been
more careful about these issues. Really).


Carlos Ribeiro
cribeiro at mail.inet.com.br








More information about the Python-list mailing list