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

This commit is contained in:
David Sanders 2021-07-13 01:19:54 +10:00 committed by GitHub
parent 66c5853406
commit da2e673c53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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.