basic language question

Michael Peuser mpeuser at
Thu Sep 4 20:58:04 CEST 2003

"Stephan Diehl" <stephan.diehl at> schrieb im Newsbeitrag
news:bj7ots$48j$06$1 at
> 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.

There is a very old religious law saying: Thou shalt not cause side effects
by a function.
There is some wisdom in it but it is easily forgotten with languages which
do not differ between functions and routines.

Michael P

More information about the Python-list mailing list