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 wim.glenn
Recipients docs@python, wim.glenn
Date 2012-12-16.13:53:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Any object that supports the in operator can be passed as the choices value, so dict objects, set objects, custom containers, etc. are all supported.  (from )

Actual behaviour is contradicted by the docs - it seems the container must additionally be iterable.  When using a custom container, argparse b0rks on trying to iterate through choices.  Using a metavar prevents this, but it still breaks on cases where the element is not in the container.  

More details here:
Date User Action Args
2012-12-16 13:53:55wim.glennsetrecipients: + wim.glenn, docs@python
2012-12-16 13:53:55wim.glennsetmessageid: <>
2012-12-16 13:53:55wim.glennlinkissue16697 messages
2012-12-16 13:53:54wim.glenncreate