Augmented Assignment (was: Re: PEP scepticism)

Guido van Rossum guido at
Sat Jul 7 09:39:02 EDT 2001

Thomas Wouters <thomas at> writes:

> But
>     x = ()
>     x += y
> is not, and that's exactly what I meant.

But x will never have a refcount of two in this case: there's one
reference from x, one from the argument list to +=, and one from the
global variable that holds on to the empty tuple so it can be shared
with others.

--Guido van Rossum (home page:

More information about the Python-list mailing list