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 cortopy
Recipients cortopy
Date 2015-09-10.16:32:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441902721.49.0.220159496647.issue25058@psf.upfronthosting.co.za>
In-reply-to
Content
My apologies for the formatting of the last line. This is my issue corrected:

When trying to assign the metavar in add_argument() method of argparse module I'm unable to include characters after a right square bracket.

Trying to set something like this:

metavar="[host:database:collection:]field"

would raise an AssertionError, which includes:

File "/usr/lib64/python3.4/argparse.py", line 329, in _format_usage
    assert ' '.join(opt_parts) == opt_usage

However, the following is accepted:

metavar="[host:database:collection:] field"
History
Date User Action Args
2015-09-10 16:32:01cortopysetrecipients: + cortopy
2015-09-10 16:32:01cortopysetmessageid: <1441902721.49.0.220159496647.issue25058@psf.upfronthosting.co.za>
2015-09-10 16:32:01cortopylinkissue25058 messages
2015-09-10 16:32:01cortopycreate