[issue38971] codecs.open leaks file descriptor when invalid encoding is passed
Serhiy Storchaka
report at bugs.python.org
Thu Dec 5 00:26:50 EST 2019
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
Many reasons.
1. It is simpler.
2. We will need a try/except in any case to prevent a leak if an exception be raised by other code following open().
3. It matches the behavior of io.open().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38971>
_______________________________________
More information about the Python-bugs-list
mailing list