summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2019-10-07 02:08:48 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-10-07 02:08:48 (GMT)
commit9e71917e0290972f65711f75510078f799cf0b59 (patch)
tree3529f4d478c896a3b03b2c32d22672a76ec7f121 /Doc/library
parent24ddd9c2d6ab61cbce7e68d6de36d4df9bd2c3fb (diff)
downloadcpython-9e71917e0290972f65711f75510078f799cf0b59.zip
cpython-9e71917e0290972f65711f75510078f799cf0b59.tar.gz
cpython-9e71917e0290972f65711f75510078f799cf0b59.tar.bz2
bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)
The `required` argument to `argparse.add_subparsers` was added in #3027. This PR specifies the earliest version of Python where it is available. https://bugs.python.org/issue26510 Automerge-Triggered-By: @merwok
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/argparse.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index a8aeca4..00115d5 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1636,7 +1636,7 @@ Sub-commands
stored; by default ``None`` and no value is stored
* required_ - Whether or not a subcommand must be provided, by default
- ``False``.
+ ``False`` (added in 3.7)
* help_ - help for sub-parser group in help output, by default ``None``
@@ -1792,6 +1792,9 @@ Sub-commands
>>> parser.parse_args(['2', 'frobble'])
Namespace(subparser_name='2', y='frobble')
+ .. versionchanged:: 3.7
+ New *required* keyword argument.
+
FileType objects
^^^^^^^^^^^^^^^^