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

2012-07-15 Thread R. David Murray
R. David Murray added the comment: Re-reading the issue I think the OP was not trying to define '-debug', but was indeed reporting the behavior when -debug was passed to the parser. I've committed your tests (thanks). So we now have tests for both cases, and this issue can be closed as inv

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

2012-07-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 844bb753570f by R David Murray in branch 'default': #4640: Add optparse tests for '-xxx' invalid when defining options. http://hg.python.org/cpython/rev/844bb753570f -- nosy: +python-dev ___ Python track

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

2012-07-09 Thread Aaron
Aaron added the comment: I came across this bug report and was unable to reproduce the described behavior. I wrote a few test cases demonstrating that the behavior is indeed correct. It passes both against 2.5.2 (the version described in the report) and the lastest 2.7. The relevant code i