py.user added the comment:
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.
----------
status: pending -> open
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com