Python dot-equals (syntax proposal)

Aahz aahz at pythoncraft.com
Sun May 2 00:06:48 EDT 2010


In article <4bdcd631$0$27782$c3e8da3 at news.astraweb.com>,
Steven D'Aprano  <steve at REMOVE-THIS-cybersource.com.au> wrote:
>On Sat, 01 May 2010 07:13:42 -0500, Tim Chase wrote:
>> 
>> The += family of operators really do rebind the symbol, not modify the
>> object.
>
>They potentially do both, depending on the object, even for built-ins.

No, they always rebind; sometimes they modify the object and sometimes
they rebind the original target to the same object.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan



More information about the Python-list mailing list