This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年05月01日 14:38 by SilentGhost, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test.py | SilentGhost, 2013年05月01日 14:38 | |||
| Messages (1) | |||
|---|---|---|---|
| msg188228 - (view) | Author: SilentGhost (SilentGhost) * (Python triager) | Date: 2013年05月01日 14:38 | |
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.
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:45 | admin | set | github: 62089 |
| 2013年05月01日 17:09:47 | r.david.murray | set | status: open -> closed superseder: Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 resolution: duplicate stage: resolved |
| 2013年05月01日 15:07:56 | SilentGhost | set | title: argparse subparsers break without without argument -> argparse subparsers break without arguments |
| 2013年05月01日 14:38:47 | SilentGhost | create | |