New submission from Zach Beniash <[email protected]>:
Today when using argparse.ArgumentParser it seems that the bool type is not
supported in a logical way.
Foe example:
-------------------------------------
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--mybool", type=bool)
parsed_args = parser.parse(["--mybool", "False"])
--------------------------------------
parsed_args.my_bool evaluates to True
Instead we should expect to evaluate False here.
----------
components: Library (Lib)
messages: 347686
nosy: Zach Beniash
priority: normal
severity: normal
status: open
title: ArgumentParser should support bool type according to truth values
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37564>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com