From: Thomas Heller Date: Wed, 5 Jun 2002 12:55:19 +0000 (+0000) Subject: Better isinstance error message. X-Git-Tag: v2.3c1~5460 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aee2d5f975dfa53fb270439d9e09d542d8ea765f;p=python Better isinstance error message. Closes SF patch # 560250. Bugfix candidate IMO. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index d10d9d4b0c..917195a200 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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);