Skip to content

Commit

Permalink
bpo-16468: Clarify which objects can be passed to "choices" in argpar…
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger authored Aug 29, 2019
1 parent cd81f05 commit 84125fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84125fe

Please sign in to comment.