[pypy-dev] wrong precedence of __radd__ vs list __iadd__

Laura Creighton lac at openend.se
Sun Mar 13 05:08:00 CET 2011

In a message of Sat, 12 Mar 2011 17:21:01 EST, Philip Jenvey writes:
>On Mar 10, 2011, at 3:53 PM, Armin Rigo wrote:
>> Hi Greg,
>> On Wed, Mar 9, 2011 at 7:13 PM, Greg Price <greg at quora.com> wrote:
>>> The following program works in CPython, but fails in PyPy:
>> This is (if we are positive) an internal implementation detail and (if
>> we are negative) a bug in CPython. 
>Jython passes the first example. Shouldn't pypy's inplace_add__List_ANY b
>e returning NotImplemented (or whatever the pypy equiv. would be, FailedT
>oImplement?) instead of raising the exception? To allow the binop rules t
>o continue.
>We fail the 2nd example like PyPy does but that's a different problem.
>Philip Jenvey

I posted a note about this to python-dev
and the reaction on python-dev seems to be unanimous that Cpython is
broken, and that pypy is doing the correct thing.  Current discussion
is about whether to just fix it, as a bug in Cpython or whether to
deprecate it and then stop it, as a kindness to those who relied on
it, or to backport the fix to 2.7 as well.


More information about the Pypy-dev mailing list