Contribution from Gerrit Holl:
This patch changes the string-based exceptions to class-based exceptions, so that you can fetch the unknown option as an attribute. As far as I know, it is backward compatible. [The new exception class is called GetoptError; the name error is an alias for compatibility.]
G
Guido van Rossum committed
80c33e562ddcc0af4eed6708aa30603972e62cfc
Parent: b9bdfc6