[<<][python][>>][..]
Thu Sep 12 11:11:37 EDT 2013

Return the object please!

list([1,2,3]).append(4) -> NoneType

In general it seems that most functions do this properly, allowing
dot-chaining of operations.  Why doesn't append return the object?

Answer: The functional append is the '+' operator.

Some more info here[1].


[1] http://docs.python.org/2/tutorial/datastructures.html#functional-programming-tools




[Reply][About]
[<<][python][>>][..]