From: David Sanders Date: Mon, 12 Jul 2021 15:19:54 +0000 (+1000) Subject: bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) X-Git-Tag: v3.11.0a1~699 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da2e673c53974641a0e13941950e7976bbda64d5;p=thirdparty%2FPython%2Fcpython.git bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) --- diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index b2eb9eff914c..a1b4bd0fcfd1 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.