New submission from Jason R. Coombs:

In Doc/tutorial/inputoutput.rst, the docs state this about opening a file:

 Normally, files are opened in :dfn:`text mode`, that means, you read and write
 strings from and to the file, which are encoded in a specific encoding (the
 default being UTF-8).

That statement is directly contradicted by the docs for open 
(Doc/library/functions.rst) which indicate:

 In text mode, if encoding is not specified the encoding used is platform
 dependent: locale.getpreferredencoding(False) is called to get the current
 locale encoding.

The implementation matches the latter indication.

----------
assignee: docs@python
components: Documentation, IO
messages: 247433
nosy: docs@python, jason.coombs
priority: normal
severity: normal
status: open
title: Input and Output tutorial erroneously references default encoding UTF-8
versions: Python 3.4, Python 3.5, Python 3.6

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

Reply via email to