This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bethard
Recipients Joseph.Birr-Pixton, bethard, eric.araujo
Date 2012-02-29.08:11:05
SpamBayes Score 6.583697e-05
Marked as misclassified No
Message-id <1330503066.13.0.948835326332.issue14149@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-02-29 08:11:06bethardsetrecipients: + bethard, eric.araujo, Joseph.Birr-Pixton
2012-02-29 08:11:06bethardsetmessageid: <1330503066.13.0.948835326332.issue14149@psf.upfronthosting.co.za>
2012-02-29 08:11:05bethardlinkissue14149 messages
2012-02-29 08:11:05bethardcreate