Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
_PyType_Lookup doesn't set an exception. But if an exception was raised inside, it will be cleared, and this will clear an exception if it was raised before _PyType_Lookup. assert() is needed for guaranteeing that no exception will be lost. I'm +1 for saving/restoring (or rather chaining) the exception. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34068> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com