var or inout parm?

Hrvoje Niksic hniksic at xemacs.org
Fri Dec 12 09:13:33 EST 2008


sturlamolden <sturlamolden at yahoo.no> writes:

> Actually I would consider this to be a bug. The tuple is immutable,
> but no mutation of the tuple is ever attempted.

That's a common misconception about how += works in Python.  It simply
*always* rebinds.  Once you grok that, everything else follows.



More information about the Python-list mailing list