STINNER Victor added the comment: > Alternative solution of this issue would be to use "from builtins import open > as _open" instead of "import builtins".
Right. I prefer your solution because it's much simpler, it doesn't make traceback less usable at exit, and it doesn't need to make assumption on the Python status. Here is a patch implementing this idea with an unit test. ---------- Added file: http://bugs.python.org/file36892/traceback_at_exit.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22599> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com