[New-bugs-announce] [issue17889] argparse subparsers break without without argument

SilentGhost report at bugs.python.org
Wed May 1 16:38:47 CEST 2013


New submission from SilentGhost:

If you run attached file w/ 3.2 and 3.3 (and later) versions, you'll notice that the new version of parser doesn't handle empty argument list:

$ python3.2 test.py
usage: test.py [-h] {demo} ...
test.py: error: too few arguments
$ python3.3 test.py
Namespace()

Everything is naturally failing in 3.3 version as the execution continues with the empty Namespace. I suspect this is due to the issue10424 that removed explicit check for positionals.

----------
components: Library (Lib)
files: test.py
keywords: 3.3regression
messages: 188228
nosy: SilentGhost, bethard, maker, r.david.murray
priority: normal
severity: normal
status: open
title: argparse subparsers break without without argument
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30095/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17889>
_______________________________________


More information about the New-bugs-announce mailing list