Martin v. Löwis <mar...@v.loewis.de> added the comment:

> I am just wondering why we want to be quite different from how many
> other languages are approaching the issue.

Because we have exceptions, and they don't. Would you also propose
that open() should return None, just because fopen(3) returns NULL?

While it may be debatable whether applications care about the error
when passing "" as the locale, there is also the second case where
applications pass an explicit locale

  setlocale(locale.LC_ALL, "de...@euro")

When they do that, they surely want to be told if this actually
worked.

> 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.

There is also the backwards compatibility issue: your change
will break existing code.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1443504>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to