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 eric.smith
Recipients docs@python, eric.smith
Date 2019-08-08.13:30:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565271055.06.0.436207643911.issue37793@roundup.psfhosted.org>
In-reply-to
Content
https://docs.python.org/3/library/argparse.html#choices says "These can be handled by passing a container object as the choices keyword argument to add_argument()".

I think this should be "iterable" instead. Internally, argparse reads the iterable and converts it to a list so that it can read it multiple times (among other reasons, I'm sure). One of the examples uses range(), which is not a container.

"container" is also used in https://docs.python.org/3/library/argparse.html#the-add-argument-method

Bonus points for fixing the docstring in argparse.py. I didn't check if anywhere else in that file needs to be fixed.
History
Date User Action Args
2019-08-08 13:30:55eric.smithsetrecipients: + eric.smith, docs@python
2019-08-08 13:30:55eric.smithsetmessageid: <1565271055.06.0.436207643911.issue37793@roundup.psfhosted.org>
2019-08-08 13:30:54eric.smithlinkissue37793 messages
2019-08-08 13:30:54eric.smithcreate