For the record, the copy and paste fix seems to have worked, so far. Pupeno wrote:
> Hello, > I am doing some extreme use of optparse, that is, extending it as > explained on > http://docs.python.org/lib/optparse-other-reasons-to-extend-optparse.html > I have subclassed OptionParser and Option. MyOptionParser uses MyOption as > option_class and in Python 2.4 it works. But I have to target Python 2.3. > In Python 2.3 the help and version options seem to be created before even > a parser is created and they are created using a hardcoded call to Option. > So, they are not using MyOption. I am creating MyOption specifically for > the help and version Option so I need the to be MyOption. > I check out the documentation of this module for Python 2.3 and it > recommends the same procedure: > http://www.python.org/doc/2.3/lib/optparse-extending-other-reasons.html > Is this a bug in Python 2.3 that was solved in 2.4 and nobody cared to > backport ? > At any rate, what are my options (no pun intended) ? > I could copy and paste the fix[1] from Python 2.4 into MyOptionParser; I > checked it carefull and it seems it would work, but I am not sure, does > anybody know ? > Should I override the hardcoded module variables of optparse in 2.3 ? > (that seems like a bad, bad idea). > I am open to suggestions. > Thanks. -- Pupeno <[EMAIL PROTECTED]> (http://pupeno.com) -- http://mail.python.org/mailman/listinfo/python-list