mirror of
https://github.com/python/cpython.git
synced 2025-10-03 13:45:29 +00:00
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:
parent
489c273583
commit
c786988b19
1 changed files with 2 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue