Serhiy Storchaka added the comment: PyDict_GetItem and lookdict_string use PyString_CheckExact for fast path. String subclasses are proceeded in general way. PyObject_GetAttr and string_richcompare use PyString_Check because they work with string and string subclasses. Py_TPFLAGS_STRING_SUBCLASS shouldn't be used if the type is not string subclass.
---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26421> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com