[issue1443504] locale.getpreferredencoding() dies when setlocale fails

R. David Murray report at bugs.python.org
Mon May 4 00:21:29 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

On Sun, 3 May 2009 at 08:55, Jeroen Ruigrok van der Werven wrote:
> I am just wondering why we want to be quite different from how many
> other languages are approaching the issue. Sure enough, we can use a
> try: construct, but it kind of defeats the principle of least
> astonishment by being different from the rest on this issue.

Only if you imagine that the principal applies to expectations inherited
from other languages.  In a Python context, which is what the principle
actually refers to, it would be astonishing if the error were to be
silently ignored.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1443504>
_______________________________________


More information about the Python-bugs-list mailing list