[issue4600] __class__ assignment: new-style? heap? == confusing

Feb. 27, 2011
6:25 p.m.
Benjamin Peterson <benjamin@python.org> added the comment: This is not really accurate:
class x(int): pass ... class y(object): pass ... x().__class__ = y Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __class__ assignment: 'x' object layout differs from 'y' y().__class__ = x Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __class__ assignment: 'y' object layout differs from 'x'
---------- nosy: +benjamin.peterson _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue4600> _______________________________________
5175
Age (days ago)
5175
Last active (days ago)
0 comments
1 participants
participants (1)
-
Benjamin Peterson