[Python-Dev] INPLACE_ADD and INPLACE_MULTIPLY oddities in ceval.c
Guido van Rossum
guido at python.org
Wed Mar 29 21:03:21 CEST 2006
On 3/29/06, Tim Hochberg <tim.hochberg at ieee.org> wrote:
> Ouch. Assuming the same path is followed with tuples, I think that this
> means the following behaviour will continue:
>
> >>> t = (1,2,3)
> >>> a = array([4,5,6])
> >>> t += a
> >>> t
> array([5, 7, 9])
>
> That's not particularly desirable.
Why not? It doesn't really differ much from the following example IMO:
>>> x = 3
>>> x += 0.5
>>> x
3.5
>>>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list