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

Stephen Hansen me+list/python at ixokai.io
Mon Aug 22 00:49:03 EDT 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.

Similarly:

> 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: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20110821/ae63acc0/attachment-0001.sig>


More information about the Python-list mailing list