]> granicus.if.org Git - python/commit
Disallow class assignment completely unless both old and new are heap
authorGuido van Rossum <guido@python.org>
Sat, 10 Aug 2002 05:42:07 +0000 (05:42 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 10 Aug 2002 05:42:07 +0000 (05:42 +0000)
commit40af889081938c1fea83cba0a9cbdb35e299119d
treeb82e6e114ba1710a0d4bb6fbdd23baf7c7a25dea
parente05f65a0c6fb0b59fe72bcb8055eb74a3f63bff8
Disallow class assignment completely unless both old and new are heap
types.  This prevents nonsense like 2.__class__ = bool or
True.__class__ = int.
Lib/test/test_descr.py
Objects/typeobject.c