INADA Naoki added the comment: As Benjamin commented, this is caused by mutating internal dict.
PyType_Lookup() use "method cache", based on "tp_version_tag" in the type object. When you modify internal dict directly, namespace is changed without invalidating tp_version_tag. So cached pointer is used, and it's already deallocated. I don't know we should fix it or not. I don't have any idea fix this without any performance penalty. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31166> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com