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

Armin Rigo arigo at tunes.org
Thu Mar 10 21:53:49 CET 2011


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.  There is no way to define in pure
Python a list-like type that would have the exact same behavior.  We
already have one such special case for __add__/__radd__ on subclasses
of strings and unicodes, which appears to be the use case that people
rely on most often, but I don't see the point in duplicating this
strange behavior for lists, tuples, and so on, unless there are really
several programs out there that rely on it.


A bientôt,

Armin.



More information about the Pypy-dev mailing list