[pypy-issue] Issue #2385: Missing __self__ from super objects (pypy/pypy)
David MacIver
issues-reply at bitbucket.org
Tue Aug 30 06:22:05 EDT 2016
New issue 2385: Missing __self__ from super objects
https://bitbucket.org/pypy/pypy/issues/2385/missing-__self__-from-super-objects
David MacIver:
```python
class Foo(object):
pass
x = Foo()
assert super(Foo, x).__self__ is x
```
This works on CPython 2.7 but on pypy 3.5.1 it errors with
```
Traceback (most recent call last):
File "superior.py", line 6, in <module>
assert super(Foo, x).__self__ is x
AttributeError: 'super' object has no attribute '__self__'
```
What's weird is this seems to be a regression. I don't currently have an old pypy around to test on but I found this because code that was working on pypy 2.6.1 started breaking when I upgraded my build to 3.5.1
More information about the pypy-issue
mailing list