relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

Stephen Hansen me+list/python at
Mon Aug 22 06:49:03 CEST 2011

On 8/21/11 9:37 PM, Stephen Hansen wrote:
> But, += is Python itself adding an unpredictable behavior into the core
> language, with its own base types behaving

... very differently to fundamental, basic appearing operators.

Editing fail on my part.


> But for Python, all by itself, with nothing but built-in and basic
> types, to have a situation where:
>     a = a + b
>     a += b

... would be clearer if the second example were "x += y".

> ... does two very distinctly different actions, even if in many or
> even most circumstances the end-result is probably the same and probably
> fine, is my criticism.


   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Python-list mailing list