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.

classification
Title: Fix abstract isinstance
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nascheme Nosy List: gvanrossum, nascheme
Priority: normal Keywords: patch

Created on 2001-09-25 22:42 by nascheme, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
abstract_isinstance.diff nascheme, 2001-09-25 22:42
Messages (3)
msg37717 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2001-09-25 22:42
The built-in isinstance function is still broken when
used on extension classes.  For example:

>>> from ExtensionClass import Base
>>> class Super:
...   pass
... 
>>> isinstance(Super(), Base)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: isinstance() arg 2 must be a class or type

isinstance() should allow any object as the first
argument and a class, a type, or something with a
__bases__ tuple attribute for the second argument.

msg37718 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-10-12 22:06
Logged In: YES 
user_id=6380

I apologize. Somehow I thought this was a bugh report rather
than a patch, and put off looking at it. When I found the
patch, it was out of date. Can you rework the patch? You
might as well check it in as long as the test suite still
works, so we get this in time for 2.2b1.
msg37719 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2001-10-18 03:19
Logged In: YES 
user_id=35752

Checked in as abstract.c 2.85.
History
Date User Action Args
2022-04-10 16:04:28adminsetgithub: 35234
2001-09-25 22:42:34naschemecreate