This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Trundle
Recipients Trundle, flox, vstinner
Date 2010-09-03.12:33:14
SpamBayes Score 0.00040158897
Marked as misclassified No
Message-id <1283517196.84.0.572893097492.issue9756@psf.upfronthosting.co.za>
In-reply-to
Content
It's because you can fool `PyObject_IsInstance()` that way:

>>> class Spam(object):
...     def __getattribute__(self, name):
...         if name == '__class__':
...             return str
...         raise AttributeError
... 
>>> isinstance(Spam(), str)
True
History
Date User Action Args
2010-09-03 12:33:17Trundlesetrecipients: + Trundle, vstinner, flox
2010-09-03 12:33:16Trundlesetmessageid: <1283517196.84.0.572893097492.issue9756@psf.upfronthosting.co.za>
2010-09-03 12:33:14Trundlelinkissue9756 messages
2010-09-03 12:33:14Trundlecreate