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 richlowe
Recipients eric.araujo, gruszczy, richlowe
Date 2011-03-01.22:29:15
SpamBayes Score 1.5394418e-05
Marked as misclassified No
Message-id <1299018558.31.0.588963520222.issue8841@psf.upfronthosting.co.za>
In-reply-to
Content
I don't find anything lacking about the error messages, I meant that there were no more specific exceptions, or fields in GetoptError to allow the caller to tell what was specifically wrong and provide its own localized messages.  So while the defaults are unlocalized, all an application can do is interpret the error string to provide a localized message.

The solution I was thinking of is getopt raising sub-types of GetoptError for each specific error case (unknown option, option requires argument, etc), and the message text of each of those being localized through gettext().  I'm not sure what problems that could cause with compatibility however, beyond obviously anyone who's already resorted to interpreting the string would have problems.
History
Date User Action Args
2011-03-01 22:29:18richlowesetrecipients: + richlowe, eric.araujo, gruszczy
2011-03-01 22:29:18richlowesetmessageid: <1299018558.31.0.588963520222.issue8841@psf.upfronthosting.co.za>
2011-03-01 22:29:15richlowelinkissue8841 messages
2011-03-01 22:29:15richlowecreate