bpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566)

This commit is contained in:
Raymond Hettinger 2019-08-29 00:58:08 -07:00 committed by GitHub
parent cd81f0500f
commit 84125fed2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -1102,9 +1102,8 @@ container should match the type_ specified::
usage: doors.py [-h] {1,2,3}
doors.py: error: argument door: invalid choice: 4 (choose from 1, 2, 3)
Any object that supports the ``in`` operator can be passed as the *choices*
value, so :class:`dict` objects, :class:`set` objects, custom containers,
etc. are all supported.
Any container can be passed as the *choices* value, so :class:`list` objects,
:class:`set` objects, and custom containers are all supported.
required