[issue42203] Unexpected behaviour NameError: name 'open' is not defined

Serhiy Storchaka report at bugs.python.org
Fri Oct 30 04:14:07 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It can happen if the code is executed very late at the shutdown stage. The builtin module is restored to its initial state (open is imported from io) to get rid of reference cycles.

----------
nosy: +serhiy.storchaka, vinay.sajip

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42203>
_______________________________________


More information about the Python-bugs-list mailing list