Andreas Stührk <andy-pyt...@hammerhartes.de> added the comment: 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 ---------- nosy: +Trundle _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9756> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com