]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport theller's checkin of
authorMichael W. Hudson <mwh@python.net>
Tue, 24 Sep 2002 11:11:12 +0000 (11:11 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 24 Sep 2002 11:11:12 +0000 (11:11 +0000)
    revision 2.102 of abstract.c

Better isinstance error message.

Closes SF patch # 560250.

Bugfix candidate IMO.

Objects/abstract.c

index 30c69e8c974601c61dc0939f8821fd1a96d1a4b9..047f62f017b988a6553d46c8f5ab139c98ea3307 100644 (file)
@@ -1980,7 +1980,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);