mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Issue #13605: use print() in argparse nargs example
This commit is contained in:
parent
f06d444f5a
commit
0467686e07
1 changed files with 1 additions and 1 deletions
|
@ -848,7 +848,7 @@ values are:
|
|||
>>> parser.add_argument('--foo')
|
||||
>>> parser.add_argument('command')
|
||||
>>> parser.add_argument('args', nargs=argparse.REMAINDER)
|
||||
>>> print parser.parse_args('--foo B cmd --arg1 XX ZZ'.split())
|
||||
>>> print(parser.parse_args('--foo B cmd --arg1 XX ZZ'.split()))
|
||||
Namespace(args=['--arg1', 'XX', 'ZZ'], command='cmd', foo='B')
|
||||
|
||||
If the ``nargs`` keyword argument is not provided, the number of arguments consumed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue