]> granicus.if.org Git - python/commitdiff
Better isinstance error message.
authorThomas Heller <theller@ctypes.org>
Wed, 5 Jun 2002 12:55:19 +0000 (12:55 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 5 Jun 2002 12:55:19 +0000 (12:55 +0000)
Closes SF patch # 560250.

Bugfix candidate IMO.

Objects/abstract.c

index d10d9d4b0ca2217d71969d38f780e7cac4bcc361..917195a200bcdfe1e470ac183059ebb6c15751f2 100644 (file)
@@ -1976,7 +1976,8 @@ PyObject_IsInstance(PyObject *inst, PyObject *cls)
                        /* Do not mask errors. */
                        if (!PyErr_Occurred())
                                PyErr_SetString(PyExc_TypeError,
-                               "isinstance() arg 2 must be a class or type");
+                               "isinstance() arg 2 must be a class, type,"
+                               " or tuple of classes and types");
                        return -1;
                }
                Py_DECREF(cls_bases);