Message117846
Mainly to protect against potential infinite recursion with isinstance checks. Also, performance is probably better.
Here are the relevant code and comments in PyErr_GivenExceptionMatches() (in Python/errors.c):
/* PyObject_IsSubclass() can recurse and therefore is
not safe (see test_bad_getattr in test.pickletester). */
res = PyType_IsSubtype((PyTypeObject *)err, (PyTypeObject *)exc); |
|
Date |
User |
Action |
Args |
2010-10-01 23:00:51 | pitrou | set | recipients:
+ pitrou, cool-RR |
2010-10-01 23:00:51 | pitrou | set | messageid: <1285974051.05.0.846922021131.issue10011@psf.upfronthosting.co.za> |
2010-10-01 23:00:35 | pitrou | link | issue10011 messages |
2010-10-01 23:00:35 | pitrou | create | |
|