[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 invalid.

--
resolution: accepted -> invalid
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is line 602 of optparse.py in the function 
Option._set_opt_strings().

I believe this bug can be closed.

--
keywords: +patch
nosy: +hac.man
Added file: http://bugs.python.org/file26338/test_optparse.py.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com