Return value of an assignment statement?
aahz at pythoncraft.com
Fri Feb 22 20:00:17 CET 2008
In article <47be994b$0$6538$426a34cc at news.free.fr>,
Bruno Desthuilliers <bruno.42.desthuilliers at wtf.websiteburo.oops.com> wrote:
>FWIW, it's IMHO a real wart - given Python's pretention at readability -
>that augmented assignement has been implemented that way for lists.
This was debated extensively when augmented assignment was created, and
it was decided that practicality beat purity. It's just too convenient
to be able to write
L += ['foo']
without rebinding L.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"All problems in computer science can be solved by another level of
indirection." --Butler Lampson
More information about the Python-list