Terry Reedy wrote:
> Localized messages should be in addition to rather than a replacement
> for the English version. I thought we had this discussion somewhere --
> here? ideas? maybe a tracker issue?

This could be done as a free-standing library, there's no reason to
involve core CPython.  Just do message translation at a later stage,
e.g. in a custom sys.excepthook. 

I did a quick demo:
|  Python 3.2a1 (r32a1:83346, Jul 31 2010, 18:36:39) [MSC v.1500 32 bit
(Intel)] on
|   win32
|  Type "help", "copyright", "credits" or "license" for more
information.
|  >>> import localise_exceptions
|  >>> localise_exceptions.install_excepthook('DK')
|  >>> None.no_such_attr
|  Traceback (most recent call last):
|  
|    File "<stdin>", line 1, in <module>
|  
|  AttributeError: 'NoneType' objektet har ingen attribut 'no_such_attr'

localise_exceptions.py is at http://pastebin.com/QJCn8gmd

regards, Anders

_______________________________________________
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