Martin Panter added the comment:

FWIW I don’t see it as a drastic change. If the current patch for Issue 12029 
went ahead, I imagine the change for instance checking could look like

@@ PyErr_GivenExceptionMatches()
-    /* err might be an instance, so check its class. */
-    if (PyExceptionInstance_Check(err))
-        err = PyExceptionInstance_Class(err);
@@ given_exception_matches_inner()
-    res = PyObject_IsSubclass(err, exc);
+    if (PyExceptionInstance_Check(err)) {
+        res = PyObject_IsInstance(err, exc);
+    } else {
+        res = PyObject_IsSubclass(err, exc);
+    }

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25537>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to