Fredrik Lundh wrote:
> any suggestions on how to improve this ?

Introducing sys.commandline is fine; overriding sys.excepthook
still worrisome.

What's wrong with triggering this in some __repr__ implementation?

If an excepthook must be installed, why couldn't the previous
excepthook be preserved, and called in case the exception is
not what you are looking for?
Of course, even if this excepthook behaves friendly, some other
package might overwrite excepthook without preserving yours,
in which case people would "sometimes" get a NameError when
they try to exit.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to