[issue16965] 2to3 should rewrite execfile() to open in 'rb' mode

Serhiy Storchaka report at bugs.python.org
Fri Oct 12 03:18:26 EDT 2018


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

`exec(compile(open("fn", "rb").read(), "fn", 'exec'))` will emit a resource warning because the open file is not closed explicitly.

But this is a different issue.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list