[Patches] [ python-Patches-649608 ] tuple arg for issubclass

noreply@sourceforge.net noreply@sourceforge.net
Fri, 06 Dec 2002 08:32:04 -0800


Patches item #649608, was opened at 2002-12-06 17:32
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=649608&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
Assigned to: Nobody/Anonymous (nobody)
Summary: tuple arg for issubclass

Initial Comment:
The following patch enhances issubclass(), so that it's
possible to pass a tuple as the second argument. This
has the same meaning as for isinstance(): the first
argument will be checked against each entry in the tuple.

The patch works somewhat differently than isinstance,
because for isinstance, a tuple argument is unpacked
recursively, this patch doesn't do this, instead any
entry in the tuple that isn't a class raises a TypeError.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=649608&group_id=5470