[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

paul j3 report at bugs.python.org
Sun Sep 9 13:03:17 EDT 2018


paul j3 <ajipanca at gmail.com> added the comment:

It's been sometime since I looked at this issue.  

The main sticking point is passing unittests, and ensuring that there are no backward compatibility issues.

But, since FileType is a standalone class, anyone could put a corrected version in their own workspace without modifying their stock version.  The 'type' parameter is designed for this kind of flexibility - it accepts any callable, whether a function, or a class with a __call__ method.

----------

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


More information about the Python-bugs-list mailing list