[issue37564] ArgumentParser should support bool type according to truth values

paul j3 report at bugs.python.org
Mon Jul 15 15:21:32 EDT 2019


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

The use of `bool` as registry key only works because that object already exists as a builtin.  This amounts a form of shadowing, and sets a dangerous precedent.

    type=bool

should work as documented at

https://docs.python.org/3/library/functions.html?highlight=bool#bool

even if that is not what a casual user would expect.

----------

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


More information about the Python-bugs-list mailing list