[Python-ideas] i18n and Python tracebacks

Antoine Pitrou solipsis at pitrou.net
Sat May 15 17:36:25 CEST 2010


Hello André,

> I think you forget students (including one ones) that have to deal with such
> messages.

It depends which students. If they want to become programmers, they
have to eventually master English. Many first-hand resources, and the
most vibrant programming communities, are in English.
(it's like a medieval theologian needing to know Latin)

> Imagine you could start python with
> 
> python --lang="en" your_script.py

I would do the reverse and have Python start untranslated by default.
Only by specifying an option (e.g. "python -L"), or perhaps an
environment variable, would you get the translation suited to your
system settings.

Having Python translate its error messages by default, however, could
be a disaster. It would break programs which parse those error
messages. It could also make error reporting to a developer more
complicated.

And, as I mentioned, I've seen two many dreadful translations to like
the idea of French error messages in my Python.
(how do you like « déréférencement du pointeur type-punned brisera les
strictes d'aliases » ?)

> True ...  I know I'd choose English as a default myself  for Python (even
> though, like you I believe, French is my first language).

Mine as well indeed. And I'm not even Canadian :)

Regards

Antoine.





More information about the Python-ideas mailing list