Message372182
No, parameters like `type` let the developer control what his users provides. Violating that produces a runtime error, and exit.
But in general argparse does not try to control values that the developer uses. There's plenty of time during development to catch error such as this - if they are errors at all.
'type' does not 'declare' what the attribute will be. It is a function that is applied to the input string, and converts that to something or other, or raises a TypeError. It is used only if there is a string value to work on, either from the user, or a string default.
This is not a bug, so should be closed. |
|
Date |
User |
Action |
Args |
2020-06-23 16:20:44 | paul.j3 | set | recipients:
+ paul.j3, rhettinger, xtreak, Bryan |
2020-06-23 16:20:44 | paul.j3 | set | messageid: <1592929244.92.0.656168653058.issue41087@roundup.psfhosted.org> |
2020-06-23 16:20:44 | paul.j3 | link | issue41087 messages |
2020-06-23 16:20:44 | paul.j3 | create | |
|