Message180071
> argparse does not require that choices be iterable, as it *does* use 'in', as it should. Line 2274:
> if action.choices is not None and value not in action.choices:
There are cases where it's incorrect for argparse to being using "in" instead of sequence iteration, which again leads me to think that iteration is what was intended. See issue 16977.
> So unless the usage message is generated even when not needed (I did not delve that far), non-iterables should work now as long as the user does not request the usage message or make an input mistake.
As I said in the second comment of this issue, this doesn't work in any case because the ValueError is raised on add_argument(). So I don't see how the lack of this option can be affecting any users. |
|
Date |
User |
Action |
Args |
2013-01-16 03:00:29 | chris.jerdonek | set | recipients:
+ chris.jerdonek, terry.reedy, bethard, r.david.murray, wim.glenn |
2013-01-16 03:00:28 | chris.jerdonek | set | messageid: <1358305228.93.0.00112891483264.issue16468@psf.upfronthosting.co.za> |
2013-01-16 03:00:28 | chris.jerdonek | link | issue16468 messages |
2013-01-16 03:00:28 | chris.jerdonek | create | |
|