Richard Lowe added the comment:
Sure, just localizing them in the getopt implementation would be fine.
I suggested subclassing to solve the more general problem of the caller being
able to tell one getopt error from another, for which it is a pretty common
solution
Richard Lowe added the comment:
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 default
New submission from Richard Lowe :
The GetoptError exception raised by getopt.getopt() to indicate errors in
provided arguments seems intended to be displayed to the user[1], but is not
localized and doesn't contain enough information, short of interpreting the
error string, for consume