Message113668
This is closely related to issue 9338. The parser should know that your command line requires at least the COMMAND argument, so it should stop parsing in time for that. However, in the case of subcommands, even if we solved issue 9338, you would still get the behavior that
./script.py --ignore one two COMMAND arg1 arg2
would get parsed as "arg2" being the command. So I guess there still ought to be a way to tell argparse to stop parsing nargs='+' optionals.
Seems like there's also a bug in the current behavior - you should get an error saying that no command was given, not an error saying you issued the command "--". |
|
Date |
User |
Action |
Args |
2010-08-12 08:43:10 | bethard | set | recipients:
+ bethard, r.david.murray, elsdoerfer |
2010-08-12 08:43:09 | bethard | set | messageid: <1281602589.79.0.427815597599.issue9571@psf.upfronthosting.co.za> |
2010-08-12 08:43:07 | bethard | link | issue9571 messages |
2010-08-12 08:43:06 | bethard | create | |
|