[issue26994] unexpected behavior for booleans in argparse

R. David Murray report at bugs.python.org
Tue May 10 14:37:48 EDT 2016


R. David Murray added the comment:

type=bool doesn't do what you think it does.  It does 'bool(value)', and 'bool("False")' is True, since "False" is a non-empty string.

See issue 21208 for some further discussion.

----------
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Change default behavior of arguments with type bool when options are specified

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26994>
_______________________________________


More information about the Python-bugs-list mailing list