A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-March/063115.html below:

[Python-Dev] INPLACE_ADD and INPLACE_MULTIPLY oddities in ceval.c

[Python-Dev] INPLACE_ADD and INPLACE_MULTIPLY oddities in ceval.c [Python-Dev] INPLACE_ADD and INPLACE_MULTIPLY oddities in ceval.cGuido van Rossum guido at python.org
Thu Mar 30 06:24:55 CEST 2006
On 3/29/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Tim Hochberg wrote:
>
> > Still, perhaps for Py3K it's worth considering
> > if PyNumber_InplaceAdd should only call __iadd__ and __add__, not
> > __radd__. Thus giving the target object complete control during inplace
> > adds.
>
> That's probably reasonable, although it would break
> the conceptual notion that a += b is equivalent to
> a = a + b when a can't be modified in-place.

No, it's not reasonable, because this would fail:

x = 5
x += 0.5

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4