[issue26994] unexpected behavior for booleans in argparse
Nathan Naze
report at bugs.python.org
Tue May 10 14:55:22 EDT 2016
Nathan Naze added the comment:
> It does 'bool(value)', and 'bool("False")' is True, since "False" is a non-empty string.
Yes, I understand this. It's fine to mark as "working as intended", but coming from other flag-parsing libraries, I find the behavior unintuitive and do not understand the utility of accepting arbitrary strings given the potential for user confusion. We uncovered this behavior debugging a script used internally at Google.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26994>
_______________________________________
More information about the Python-bugs-list
mailing list