diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-12-21 10:24:15 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-12-21 10:24:15 (GMT) |
commit | 08c08eb93cc0b67215d1922adc55f3ebf40b5122 (patch) | |
tree | 6b9e2751604f62cea1069451c9de9dd756361784 /Doc/whatsnew | |
parent | 86a8a9ae983b66ea218ccbb57d3e3a5cdf918e97 (diff) | |
download | cpython-08c08eb93cc0b67215d1922adc55f3ebf40b5122.zip cpython-08c08eb93cc0b67215d1922adc55f3ebf40b5122.tar.gz cpython-08c08eb93cc0b67215d1922adc55f3ebf40b5122.tar.bz2 |
Issue #13597: Fix the documentation of the "-u" command-line option, and wording of "What's new in Python 3.0" about standard streams.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.0.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst index 523b34e..55b65ba 100644 --- a/Doc/whatsnew/3.0.rst +++ b/Doc/whatsnew/3.0.rst @@ -301,6 +301,12 @@ changed. There is no longer any need for using the encoding-aware streams in the :mod:`codecs` module. +* The initial values of :data:`sys.stdin`, :data:`sys.stdout` and + :data:`sys.stderr` are now unicode-only text files (i.e., they are + instances of :class:`io.TextIOBase`). To read and write bytes data + with these streams, you need to use their :data:`io.TextIOBase.buffer` + attribute. + * Filenames are passed to and returned from APIs as (Unicode) strings. This can present platform-specific problems because on some platforms filenames are arbitrary byte strings. (On the other hand, @@ -511,9 +517,7 @@ consulted for longer descriptions. produces a literal of type :class:`bytes`. * :ref:`pep-3116`. The :mod:`io` module is now the standard way of - doing file I/O, and the initial values of :data:`sys.stdin`, - :data:`sys.stdout` and :data:`sys.stderr` are now instances of - :class:`io.TextIOBase`. The built-in :func:`open` function is now an + doing file I/O. The built-in :func:`open` function is now an alias for :func:`io.open` and has additional keyword arguments *encoding*, *errors*, *newline* and *closefd*. Also note that an invalid *mode* argument now raises :exc:`ValueError`, not |