[issue4640] optparse doesn’t disallow adding one-dash long options (“-option”)

R. David Murray report at bugs.python.org
Sun Jul 4 16:07:41 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

I didn't commit a unit test for the revised subject, my unit test was for the previous misunderstood diagnosis.  So a unit test for disallowing single dash long options in add_option is still needed.

Note that this appears (at least on a quick test) to apply to argparse as well.  I've left 2.7 and 3.1 in versions, but I'm not 100% sure this should be backported since it is a behavior change.  But it's hard to imagine working code using this (does it even do anything, or is the single dash option just silently ignored?)

----------
nosy: +bethard
versions: +Python 3.1, Python 3.2 -Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4640>
_______________________________________


More information about the Python-bugs-list mailing list