[Python-ideas] PEP 540: Add a new UTF-8 mode

Barry Warsaw barry at python.org
Fri Jan 6 16:24:32 EST 2017


On Jan 05, 2017, at 05:50 PM, Victor Stinner wrote:

>I guess that all users and most developers are more in the "UNIX mode"
>camp. *If* we want to change the default, I suggest to use the "UNIX
>mode" by default.

FWIW, it seems to be a general and widespread recommendation to always pass
universal_newlines=True to Popen and friends when you only want to deal with
unicode from subprocesses:

    If encoding or errors are specified, or universal_newlines is true, the
    file objects stdin, stdout and stderr will be opened in text mode using
    the encoding and errors specified in the call or the defaults for
    io.TextIOWrapper.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170106/9b738c26/attachment.sig>


More information about the Python-ideas mailing list