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 jyasskin
Recipients jyasskin
Date 2008-03-17.16:45:05
SpamBayes Score 0.42594028
Marked as misclassified No
Message-id <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za>
In-reply-to
Content
>>> class Meta(type):
...   def __instancecheck__(self, other):
...     return False
>>> isinstance(3, Meta)

In 2.6, this results in:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion depth exceeded while calling a Python object
(That's a recursion in C, through PyObject_IsInstance and
instancemethod_call)

In 3.0, I get:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __instancecheck__() takes exactly 2 positional arguments (1
given)
History
Date User Action Args
2008-03-17 16:45:07jyasskinsetspambayes_score: 0.42594 -> 0.42594028
recipients: + jyasskin
2008-03-17 16:45:06jyasskinsetspambayes_score: 0.42594 -> 0.42594
messageid: <1205772306.86.0.317312162506.issue2325@psf.upfronthosting.co.za>
2008-03-17 16:45:06jyasskinlinkissue2325 messages
2008-03-17 16:45:05jyasskincreate