Message136712
| Author |
cvrebert |
| Recipients |
acooke, cvrebert, daniel.urban, eric.araujo |
| Date |
2011年05月24日.02:10:15 |
| SpamBayes Score |
2.581674e-08 |
| Marked as misclassified |
No |
| Message-id |
<1306203015.92.0.184460470427.issue12029@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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? |
|
History
|
|---|
| 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: <1306203015.92.0.184460470427.issue12029@psf.upfronthosting.co.za> |
| 2011年05月24日 02:10:15 | cvrebert | link | issue12029 messages |
| 2011年05月24日 02:10:15 | cvrebert | create |
|