This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sandro.tosi
Recipients ccx, sandro.tosi
Date 2010-09-30.15:57:01
SpamBayes Score 8.40198e-06
Marked as misclassified No
Message-id <1285862224.91.0.421624327971.issue6253@psf.upfronthosting.co.za>
In-reply-to
Content
Hello Jan,
I noticed this bug and I wondered: what's your opinion now?

Optparse is deprecated and it will be replaced by argparse, so I'm not sure it's "interesting" to introduce a new feature (the format_usage() method) but it might still be interesting to fix the previous behaviour.

So, are you still more inclined to add the new method or just correcting the harcoded formatter in get_usage() may be just fine?

If it's ok going on with the get_usage() fix, it's it just enough to:

    def get_usage(self, formatter=self.formatter):

and then just use 'formatter' (instead of checking if it's None, and then defaulting to self.formatter)? I didn't try this solution, so it might also be you've already tested and it's not working, just brain dumping :)

Regards,
Sandro
History
Date User Action Args
2010-09-30 15:57:05sandro.tosisetrecipients: + sandro.tosi, ccx
2010-09-30 15:57:04sandro.tosisetmessageid: <1285862224.91.0.421624327971.issue6253@psf.upfronthosting.co.za>
2010-09-30 15:57:02sandro.tosilinkissue6253 messages
2010-09-30 15:57:02sandro.tosicreate