Message243739
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka |
| Date |
2015年05月21日.08:40:46 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1432197646.74.0.848752631202.issue24257@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
PyObject_IsInstance() is used incorrectly for testing if Python object is an instance of specified builtin type before direct access to internals of object. This is not correct, because PyObject_IsInstance() checks the __class__ attribute that can be modified and even can be dynamic property. Correct way is to check static type. Proposed patch replaces PyObject_IsInstance() with PyObject_TypeCheck() if this is appropriate.
See also similar issues issue24102 and issue24091. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年05月21日 08:40:46 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
| 2015年05月21日 08:40:46 | serhiy.storchaka | set | messageid: <1432197646.74.0.848752631202.issue24257@psf.upfronthosting.co.za> |
| 2015年05月21日 08:40:46 | serhiy.storchaka | link | issue24257 messages |
| 2015年05月21日 08:40:46 | serhiy.storchaka | create |
|