[New-bugs-announce] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8

Jason R. Coombs report at bugs.python.org
Sun Jul 26 17:20:18 CEST 2015


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 at python
components: Documentation, IO
messages: 247433
nosy: docs at 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 <report at bugs.python.org>
<http://bugs.python.org/issue24729>
_______________________________________


More information about the New-bugs-announce mailing list