[Python-ideas] Python 3 open() text files: make encoding parameter optional for cross-platform scripts

Eli Bendersky eliben at gmail.com
Sat Jun 8 19:00:22 CEST 2013


 [snip]
> I always use '''encoding="utf-8"''', but it's annoying that it's not
> the default.
>
> 'open' defaults to universal newline support when opening for reading
> (though that's not possible when opening for writing!), and it would be
> nice if it also defaulted to a 'universal' encoding, i.e. UTF-8.
>
> [snip]

> You can still use '''encoding=None''' if you want the operating
> system's encoding.
>

And this is the default...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130608/700820c3/attachment.html>


More information about the Python-ideas mailing list