Message55070
If this were actually a true error, I'd agree with you, but it isn't. For most programs (that just do locale.setlocale(locale.LC_ALL, '') to switch on internationalisation), it's a warning, not an error; in the common case there is no reason for them to fail.
If you still insist that this has to be treated as an error, how about adding locale.enable_i18n or something for the common case that does:
try:
locale.setlocale(locale.LC_ALL, '')
except locale.Error:
pass
Because, in practice, many programs appear not to bother catching the exception, and because the programmer is typically using an environment with a properly configured locale they won't notice. It's only when you're in an environment such as sshing (with SendEnv) to a remote system that doesn't have your locale configured that you notice that C programs continue to function correctly, Perl programs issue a warning on stderr, but Python programs crash. While noticing errors is a good thing in general, it seems to go a bit far here. |
|
Date |
User |
Action |
Args |
2007-08-23 16:12:44 | admin | link | issue1703592 messages |
2007-08-23 16:12:44 | admin | create | |
|