summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-07-12 15:43:16 (GMT)
committerGitHub <noreply@github.com>2021-07-12 15:43:16 (GMT)
commit721d4796be60e6a0a11dee8318794f78928648c1 (patch)
tree45c063ad640e15374abe9e3b1f1fdfe910b38600
parent443db64f496d3988d20cfda2c3c2ceb6702df36f (diff)
downloadcpython-721d4796be60e6a0a11dee8318794f78928648c1.zip
cpython-721d4796be60e6a0a11dee8318794f78928648c1.tar.gz
cpython-721d4796be60e6a0a11dee8318794f78928648c1.tar.bz2
bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27097)
(cherry picked from commit da2e673c53974641a0e13941950e7976bbda64d5) Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
-rw-r--r--Doc/library/argparse.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index b2eb9ef..a1b4bd0 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -853,6 +853,8 @@ is available in ``argparse`` and adds support for boolean actions such as
>>> parser.parse_args(['--no-foo'])
Namespace(foo=False)
+.. versionadded:: 3.9
+
The recommended way to create a custom action is to extend :class:`Action`,
overriding the ``__call__`` method and optionally the ``__init__`` and
``format_usage`` methods.