[Python-Dev] PyObject_IsInstance is dangerous

Greg Ewing greg.ewing at canterbury.ac.nz
Mon May 18 14:41:48 CEST 2015


Serhiy Storchaka wrote:
> May be modify PyObject_IsInstance so that it will never return 
> true if layouts are not compatible?

That wouldn't be a good idea, since PyObject_IsInstance is
meant to reflect the behaviour of python's isinstance()
function, which doesn't care about C layouts.

-- 
Greg


More information about the Python-Dev mailing list