]> granicus.if.org Git - python/commit
bpo-26510: make argparse subparsers required by default (#3027)
authorAnthony Sottile <asottile@umich.edu>
Wed, 20 Sep 2017 21:35:27 +0000 (14:35 -0700)
committerÉric Araujo <merwok@users.noreply.github.com>
Wed, 20 Sep 2017 21:35:27 +0000 (17:35 -0400)
commitaaf6fc0982c916cb71d9e0afcd7dda4ba495793b
tree09cb0078fade182a8be0a108bb50b57a71156bd9
parent19e4d9346db7fb65845b98a9cb9caacaaac8a81a
bpo-26510: make argparse subparsers required by default (#3027)

This fixes a regression from Python 2.  To get optional subparsers,
use the new parameter ``add_subparsers(required=False)``.

Patch by Anthony Sottile.
Doc/library/argparse.rst
Lib/argparse.py
Lib/test/test_argparse.py
Misc/NEWS.d/next/Library/2017-09-19-13-29-29.bpo-26510.oncW6V.rst [new file with mode: 0644]