Return value of an assignment statement?

Aahz aahz at
Fri Feb 22 20:00:17 CET 2008

In article <47be994b$0$6538$426a34cc at>,
Bruno Desthuilliers  <bruno.42.desthuilliers at> 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           <*>

"All problems in computer science can be solved by another level of     
indirection."  --Butler Lampson

More information about the Python-list mailing list