New issue 2137: Infinite recursion with __coerce__
https://bitbucket.org/pypy/pypy/issues/2137/infinite-recursion-with-__coerce__

Anders Kaseorg:

This leads to infinite recursion (`RuntimeError: maximum recursion depth 
exceeded`) in PyPy 2.6.0 but not CPython 2.7.10:

```
#!python
class C:
    def __coerce__(self, other):
        print 'coerce'
        return C(), C()
    def __add__(self, other):
        return C()

C() + C()
```

CPython only calls `__coerce__` once.


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to