Message128025
While I also dislike the existing behavior, note that you can get what you want by using an equal sign.
>>> import argparse
>>> parser = argparse.ArgumentParser(prog='a2x')
>>> parser.add_argument('--asciidoc-opts',
... action='store', dest='asciidoc_opts', default=''
... metavar='ASCIIDOC_OPTS', help='asciidoc options')
>>> parser.parse_args(['--asciidoc-opts', '-1'])
Namespace(asciidoc_opts='-1')
>>> parser.parse_args(['--asciidoc-opts=-one'])
Namespace(asciidoc_opts='-one')
I always use the equal sign, so I've never noticed this behavior before.
I wish that help would display the equal sign, but that's another issue. |
|
Date |
User |
Action |
Args |
2011-02-05 20:54:38 | eric.smith | set | recipients:
+ eric.smith, bethard, r.david.murray, andersk, gdb, nelhage, drm |
2011-02-05 20:54:38 | eric.smith | set | messageid: <1296939278.25.0.584115216734.issue9334@psf.upfronthosting.co.za> |
2011-02-05 20:54:37 | eric.smith | link | issue9334 messages |
2011-02-05 20:54:37 | eric.smith | create | |
|