projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd81f05
)
bpo-16468: Clarify which objects can be passed to "choices" in argparse (GH-15566)
author
Raymond Hettinger
<rhettinger@users.noreply.github.com>
Thu, 29 Aug 2019 07:58:08 +0000
(
00:58
-0700)
committer
GitHub
<noreply@github.com>
Thu, 29 Aug 2019 07:58:08 +0000
(
00:58
-0700)
Doc/library/argparse.rst
patch
|
blob
|
history
diff --git
a/Doc/library/argparse.rst
b/Doc/library/argparse.rst
index ef2fd42783c87722a0899cdabce0e28ccaf8ad27..368b1cfebf05681caae0ecafdde130d632a699a8 100644
(file)
--- a/
Doc/library/argparse.rst
+++ b/
Doc/library/argparse.rst
@@
-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