summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index f7b442a..f3b9873 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -487,6 +487,13 @@ PyClass_IsSubclass(PyObject *class, PyObject *base)
PyClassObject *cp;
if (class == base)
return 1;
+ if (PyTuple_Check(base)) {
+ n = PyTuple_GET_SIZE(base);
+ for (i = 0; i < n; i++) {
+ if (class == PyTuple_GET_ITEM(base, i))
+ return 1;
+ }
+ }
if (class == NULL || !PyClass_Check(class))
return 0;
cp = (PyClassObject *)class;