From da2e673c53974641a0e13941950e7976bbda64d5 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 13 Jul 2021 01:19:54 +1000 Subject: bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) --- Doc/library/argparse.rst | 2 ++ 1 file changed, 2 insertions(+) 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. -- cgit v0.12