[issue13824] argparse.FileType opens a file and never closes it
Nils Kattenbeck
report at bugs.python.org
Sun Jul 25 05:27:11 EDT 2021
Nils Kattenbeck <nilskemail at gmail.com> added the comment:
A good alternative would be to use pathlib.Path. The only downside would be that one has to manually handle `-` but besides that it solves most problems.
Still the fact that file descriptors are kept open should be added as a warning to the docs
----------
nosy: +Nils Kattenbeck
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue13824>
_______________________________________
More information about the Python-bugs-list
mailing list