[issue20333] argparse subparser usage message hides main parser usage

2014-05-09 Thread paul j3
paul j3 added the comment: When `add_subparsers` creates the `_prog_prefix` it uses a list of positionals. That makes sense, since a subparser argument is positional, so the user needs to know where it fits in the broader scope of positionals. But it intentionally skips the 'optionals'. The

[issue20333] argparse subparser usage message hides main parser usage

2014-05-09 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: Added file: http://bugs.python.org/file35204/sample.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20333 ___ ___

[issue20333] argparse subparser usage message hides main parser usage

2014-01-21 Thread Martin d'Anjou
New submission from Martin d'Anjou: Consider the following code: #!/usr/bin/env python3 import argparse # create the top-level parser parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('--file', help='A filename', required=True) subparsers =

[issue20333] argparse subparser usage message hides main parser usage

2014-01-21 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +bethard, paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20333 ___ ___