This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients bethard, chris.jerdonek, r.david.murray, terry.reedy, wim.glenn
Date 2013-01-16.03:00:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358305228.93.0.00112891483264.issue16468@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-01-16 03:00:29chris.jerdoneksetrecipients: + chris.jerdonek, terry.reedy, bethard, r.david.murray, wim.glenn
2013-01-16 03:00:28chris.jerdoneksetmessageid: <1358305228.93.0.00112891483264.issue16468@psf.upfronthosting.co.za>
2013-01-16 03:00:28chris.jerdoneklinkissue16468 messages
2013-01-16 03:00:28chris.jerdonekcreate