Message136712
Scouting around the CPython codebase a bit, I speculate that the cause of this behavior is that PyErr_GivenExceptionMatches() in errors.c uses PyType_IsSubtype() [which simply walks a class's __mro__ checking for pointer equality] rather than PyObject_IsSubclass()/PyObject_IsInstance() [which are smart enough to consult __subclasscheck__()/__instancecheck__() if they exist].
Of course, the more important issue here is whether this behavior is intended or not. I surmise python-dev needs to have a discussion about it? |
|
| Date |
User |
Action |
Args |
| 2011-05-24 02:10:16 | cvrebert | set | recipients:
+ cvrebert, acooke, eric.araujo, daniel.urban |
| 2011-05-24 02:10:15 | cvrebert | set | messageid: <[email protected]> |
| 2011-05-24 02:10:15 | cvrebert | link | issue12029 messages |
| 2011-05-24 02:10:15 | cvrebert | create | |
|