bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27098)

(cherry picked from commit da2e673c53)

Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-07-12 09:23:25 -07:00 committed by GitHub
parent 489c273583
commit c786988b19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.