Steven Bethard <[email protected]> added the comment:
I can't find anywhere in the documentation where type=bool, type=unicode or
type=long are disallowed. They shouldn't be disallowed. If you want to pass
type=bool, argparse should not stop you. And it currently doesn't:
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo', type=bool)
>>> parser.parse_args([''])
Namespace(foo=False)
>>> parser.parse_args(['x'])
Namespace(foo=True)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14392>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com