[New-bugs-announce] [issue26421] string_richcompare invalid check Py_NotImplemented

yuriy_levchenko report at bugs.python.org
Tue Feb 23 09:49:58 EST 2016


New submission from yuriy_levchenko:

i have object with flag Py_TPFLAGS_STRING_SUBCLASS

stringobject.c (line 1192) in function string_richcompare

we have check string PyString_Check

but,

#define PyString_Check(op) \
                 PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_STRING_SUBCLASS)

i successful check this. But my type is not PyStringObject

Maybe need replace this check on PyString_CheckExact?

----------
messages: 260738
nosy: yuriy_levchenko
priority: normal
severity: normal
status: open
title: string_richcompare invalid check Py_NotImplemented
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26421>
_______________________________________


More information about the New-bugs-announce mailing list