On 3/29/06, Greg Ewing <[EMAIL PROTECTED]> 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/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com