Message166062
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) |
|
Date |
User |
Action |
Args |
2012-07-21 20:19:40 | bethard | set | recipients:
+ bethard, terry.reedy, shima__shima |
2012-07-21 20:19:40 | bethard | set | messageid: <1342901980.49.0.747963561582.issue14392@psf.upfronthosting.co.za> |
2012-07-21 20:19:39 | bethard | link | issue14392 messages |
2012-07-21 20:19:39 | bethard | create | |
|