]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix SF #658106, Setting __class__ to NoneType
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 24 Dec 2002 14:48:41 +0000 (14:48 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 24 Dec 2002 14:48:41 +0000 (14:48 +0000)
commit89b8e840726799007fd62ab4f7233ddd6662f102
tree60ca797db3597c526af4d2a16b2dd6baedffb987
parentca785acd1d8934e345e152442edc11c8f541fc0a
Fix SF #658106, Setting __class__ to NoneType

Backport Guido's checkin 2.171:

Disallow class assignment completely unless both old and new are heap
types.  This prevents nonsense like 2.__class__ = bool or
True.__class__ = int.
Objects/typeobject.c