[Patches] [ python-Patches-464992 ] Fix abstract isinstance
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 17 Oct 2001 20:19:54 -0700
Patches item #464992, was opened at 2001-09-25 15:42
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=464992&group_id=5470
Category: Core (C code)
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Neil Schemenauer (nascheme)
Assigned to: Neil Schemenauer (nascheme)
Summary: Fix abstract isinstance
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Neil Schemenauer (nascheme)
Date: 2001-10-17 20:19
Message:
Logged In: YES
user_id=35752
Checked in as abstract.c 2.85.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-10-12 15:06
Message:
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.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=464992&group_id=5470