Message166062
| Author |
bethard |
| Recipients |
bethard, shima__shima, terry.reedy |
| Date |
2012年07月21日.20:19:39 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342901980.49.0.747963561582.issue14392@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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) |
|
History
|
|---|
| 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 |
|