mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-33109: argparse subparsers are once again not required by default (GH-6919)
bpo-26510 in 3.7.0a2 changed the behavior of argparse to make subparsers required by default, returning to the behavior of 2.7 and 3.2. The behavior was changed in 3.3 to be no longer required. While it might make more sense to have the default to required, compatibility with 3.3 through 3.6 is probably less disruptive than trying to reintroduce compatibility with 2.7 at this point. This change restores the 3.6 behavior.
This commit is contained in:
parent
453bd0bc65
commit
8ebf5ceb0f
5 changed files with 9 additions and 3 deletions
|
@ -1577,7 +1577,7 @@ Sub-commands
|
|||
stored; by default ``None`` and no value is stored
|
||||
|
||||
* required_ - Whether or not a subcommand must be provided, by default
|
||||
``True``.
|
||||
``False``.
|
||||
|
||||
* help_ - help for sub-parser group in help output, by default ``None``
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue