[issue9540] argparse: combine subparsers with global positional args

2010-08-08 Thread R. David Murray
R. David Murray added the comment: This is almost a duplicate of issue 9253. Your proposed semantics are different, but it would be better to carry on a discussion of the "correct" semantics in that ticket rather than have two separate and conflicting ones, so I'm closing this as duplicate.

[issue9540] argparse: combine subparsers with global positional args

2010-08-07 Thread Michael . Elsdörfer
New submission from Michael.Elsdörfer : >>> parser = argparse.ArgumentParser() >>> subparsers = parser.add_subparsers(title="commands") >>> subparser = subparsers.add_parser('make') >>> parser.add_argument('jobs', nargs='*') >>> parser.print_help() usage: [-h] {make} ... [jobs [jobs ...]] While