INADA Naoki added the comment: I think the comment described "Why Py_ALLOW_RECURSION is required", not "t may be NULL even if s is in the intern dict".
> If PyDict_GetItem fails due to stack overflow, perhaps the Python process is > doomed to fail soon anyway. When I changed the code to use PyDict_SetDefault(), I found "USE_STACKCHECK" macro. See https://docs.python.org/3/c-api/sys.html#c.PyOS_CheckStack But I don't know this can be really happend. Interned dict only contains exact unicode objects. There is no chance for calling user defined __hash__() or __eq__(). ---------- nosy: +inada.naoki _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28406> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com