basic language question

Stephan Diehl stephan.diehl at gmx.net
Thu Sep 4 13:31:47 EDT 2003


Terry Reedy wrote:

> 
> "Stephan Diehl" <stephan.diehl at gmx.net> wrote in message
> news:bj7ots$48j$06$1 at news.t-online.com...
>> 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.

[...]

> 
> 'Returners' could wrap no-return mutators with functions or
> derived-class methods that do return the object, but I have never seen
> anyone post a complete module that does so for, say, all list
> mutators.

That's actually a nice idea. I might just do that.
> 
> Terry J. Reedy

Stephan





More information about the Python-list mailing list