classification
Title: optparse: parser.remove_option("-h") inconsistency
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: gward Nosy List: gward, schmir, strop
Priority: normal Keywords:

Created on 2004-08-23 10:04 by strop, last changed 2008-01-31 08:51 by amaury.forgeotdarc. This issue is now closed.

Messages (2)
msg22192 - (view) Author: strop (strop) Date: 2004-08-23 10:04
remove_option("-h") method of OptionParser has a strange 
behaviour : it can't be removed from 2 different OptionParser 
objects. 
It may be due to the fact that the help option seems to be a 
unique object. 
Even if this can be "solved" by addind add_help_option=0 to 
OptionParser constructor parameters, it seems to be an 
inconsistency wrt remove_option method 
 
msg61887 - (view) Author: Ralf Schmitt (schmir) Date: 2008-01-31 07:52
this test program work with python 2.4 and 2.5:

import optparse
p1=optparse.OptionParser()
p2=optparse.OptionParser()
p1.remove_option('-h')
p2.remove_option('-h')

This issue should be closed.
History
Date User Action Args
2008-01-31 08:51:02amaury.forgeotdarcsetstatus: open -> closed
resolution: out of date
2008-01-31 07:52:24schmirsetnosy: + schmir
messages: + msg61887
2004-08-23 10:04:55stropcreate