A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131147.html below:

[Python-Dev] Python3 "complexity"

[Python-Dev] Python3 "complexity" [Python-Dev] Python3 "complexity"Baptiste Carvello devel at baptiste-carvello.net
Fri Jan 10 17:27:45 CET 2014
Le 10/01/2014 16:35, Nick Coghlan a écrit :

> One idea we're considering for Python 3.5 is to have a report of
> "ascii" on a POSIX OS imply the surrogateescape error handler (at
> least for the standard streams, and perhaps in other contexts), since
> the OS reporting the POSIX/C locale almost certainly indicates a
> configuration error rather than intentional behaviour.

would it make sense to be more general, and allow a "lenient mode",
where all files implicitly opened with the default encoding would also
use the surrogateescape error handler ?

That way, applications designed to process text mostly written in the
default encoding would just call sys.set_lenient_mode() and be done.

Of course, libraries would need to be strongly discouraged to ever use
this and encouraged to explicitly set the error handler on appropriate
files instead.

Cheers,

Baptiste

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4