sorting list of complex numbers

Terry Reedy tjreedy at udel.edu
Wed Nov 19 11:33:32 EST 2008


Hrvoje Niksic wrote:
> Terry Reedy <tjreedy at udel.edu> writes:
> 
>> Do your tuple destructuring in the first statement in your body and
>> nothing will break.
> 
> Unless you were using a lambda, which is quite useful as argument to
> "sort".

So write a separate def statement.
If you do not want to do that, don't run with 3.0.




More information about the Python-list mailing list