[pypy-issue] Issue #2325: `__slots__` and `__class__` assignment is broken (pypy/pypy)
Daniel Holth
issues-reply at bitbucket.org
Mon Jun 13 11:32:05 EDT 2016
New issue 2325: `__slots__` and `__class__` assignment is broken
https://bitbucket.org/pypy/pypy/issues/2325/__slots__-and-__class__-assignment-is
Daniel Holth:
SCons does a lot of `__class__` assignment with classes using `__slots__`. This doesn't work on PyPy. PyPy is documented to be limited here, but SCons is also careful to keep `__slots__` the same between morphing classes, while the error message suggests the class layout differs.
Small test case
```
#!python
class A(object):
__slots__ = ['a']
class B(object):
__slots__ = ['a']
a = A(); a.__class__ = B
```
More information about the pypy-issue
mailing list