Tuples and immutability
rosuav at gmail.com
Wed Mar 12 03:10:23 CET 2014
On Wed, Mar 12, 2014 at 1:01 PM, Rick Johnson
<rantingrickjohnson at gmail.com> wrote:
> On Thursday, February 27, 2014 4:18:01 PM UTC-6, Ian wrote:
>> x += y is meant to be equivalent, except possibly in-place and more
>> efficient, than x = x + y.
> In an ideal world, the speed of these two codes should be the same, of course i'm "assuming" that most competent language designers would optimise the slower version.
Except that they don't mean the same thing, so it's not an optimization target.
More information about the Python-list