basic language question
Stephan Diehl
stephan.diehl at gmx.net
Thu Sep 4 12:53:08 EDT 2003
Daniel Dittmar wrote:
> Stephan Diehl wrote:
>> Once in a while, I get bitten by the fact, that mutating list methods
>> such as 'append' or 'extend' return None instead of the (mutated)
>> list itself. Is there a compelling reason for that? I googled around,
>> but didn't find anything about this.
>> Thanks
>>
>> Stephan
>
> The reasons described for sort ()
>
<http://www.python.org/doc/faq/general.html#why-doesn-t-list-sort-return-the
> -sorted-list> also apply to append and extend.
Thanks for the link. I don't find the given reason really compelling,
though. (but that's mine, not your problem)
>
> Daniel
Stephan
More information about the Python-list
mailing list