Author py.user
Recipients py.user, serhiy.storchaka
Date 2015-05-31.23:28:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433114891.85.0.124083182799.issue24338@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy Storchaka wrote:
> for example the use of such popular options as -0 or -@

Ok.

What about inconsistent conversion dashes to underscores?

>>> import argparse
>>> 
>>> parser = argparse.ArgumentParser(prefix_chars='@')
>>> _ = parser.add_argument('--x-one-two-three@')
>>> _ = parser.add_argument('@@y-one-two-three@')
>>> args = parser.parse_args(['abc'])
>>> args
Namespace(--x-one-two-three@='abc', y_one_two_three@=None)
>>>

We set dash as non-option char, but it continues to convert to underscore while another option char doesn't convert.
History
Date User Action Args
2015-05-31 23:28:11py.usersetrecipients: + py.user, serhiy.storchaka
2015-05-31 23:28:11py.usersetmessageid: <1433114891.85.0.124083182799.issue24338@psf.upfronthosting.co.za>
2015-05-31 23:28:11py.userlinkissue24338 messages
2015-05-31 23:28:11py.usercreate