From c786988b19d7b6808d4c940f7206b95e49e06b71 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 12 Jul 2021 09:23:25 -0700 Subject: [PATCH] bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27098) (cherry picked from commit da2e673c53974641a0e13941950e7976bbda64d5) Co-authored-by: David Sanders --- Doc/library/argparse.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index aa4713e75cd..6c01667b961 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.