Barry A. Warsaw added the comment: I added some debugging to the if(required) clause. This is interesting:
basicsize 16 slotnames 0 basicsize 16 tp_basicsize 80 basicsize 16 tp_basicsize comes in at 16 bytes. tp_dictoffset and tp_weaklistoffset must both be 0, and while slotnames is not Py_None, it must be adding 0 to the basicsize. Since sizeof(PyObject *) can't be 0, it must mean that Py_SIZE(slotnames) is 0 (since they are multiplied). But as you can see tp_basicsize is 80. So essentially PyBaseObject_Type.tp_basicsize is 16 but obj->ob_type->tp_basicsize is 80, and that triggers the traceback. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22995> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com