Steven Bethard <[email protected]> added the comment:
For optional flags like --foo-bar, argparse does munge the "dest" to "foo_bar",
following optparse. For positional arguments, arpgarse doesn't munge things
this way, but if you want the argument named "foo-bar" in help messages and
"foo_bar" on the Namespace object, you just need to do something like:
add_argument('foo_bar', metavar='foo-bar', ...)
Perhaps the docs could make this clearer.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14149>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com