summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2016-08-23 07:43:16 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2016-08-23 07:43:16 (GMT)
commit9ae505041fea29dfc52c86968db48e8c78500ecc (patch)
tree1261974fd29912e9cbb8e612f8f46860518e2fbe /Doc
parentd1c2a8e2b5d285f26f1a3c6d787d148a7c3b04de (diff)
downloadcpython-9ae505041fea29dfc52c86968db48e8c78500ecc.zip
cpython-9ae505041fea29dfc52c86968db48e8c78500ecc.tar.gz
cpython-9ae505041fea29dfc52c86968db48e8c78500ecc.tar.bz2
Issue #12713: reverted fix pending further discussion.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/argparse.rst12
1 files changed, 0 insertions, 12 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index d285c66..995c4ee 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1668,18 +1668,6 @@ Sub-commands
>>> parser.parse_args(['co', 'bar'])
Namespace(foo='bar')
- argparse supports non-ambiguous abbreviations of subparser names.
-
- For example, the following three calls are all supported
- and do the same thing, as the abbreviations used are not ambiguous::
-
- >>> parser.parse_args(['checkout', 'bar'])
- Namespace(foo='bar')
- >>> parser.parse_args(['check', 'bar'])
- Namespace(foo='bar')
- >>> parser.parse_args(['che', 'bar'])
- Namespace(foo='bar')
-
One particularly effective way of handling sub-commands is to combine the use
of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` so
that each subparser knows which Python function it should execute. For