diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-04 17:50:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 17:50:22 (GMT) |
commit | 942f7a2dea2e95a0fa848329565c0d0288d92e47 (patch) | |
tree | 31abda8d45ef676a46ea63a6a8a61ccf6061e9c5 /Doc/library/functions.rst | |
parent | 00c77ae55a82548a6b45af73cdf712ea34910645 (diff) | |
download | cpython-942f7a2dea2e95a0fa848329565c0d0288d92e47.zip cpython-942f7a2dea2e95a0fa848329565c0d0288d92e47.tar.gz cpython-942f7a2dea2e95a0fa848329565c0d0288d92e47.tar.bz2 |
bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode (GH-16959)" (GH-18767)
This reverts commit e471e72977c83664f13d041c78549140c86c92de.
The mode will be removed from Python 3.10.
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r-- | Doc/library/functions.rst | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index cc48597..ca09e6f 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1090,6 +1090,12 @@ are always available. They are listed here in alphabetical order. first decoded using a platform-dependent encoding or using the specified *encoding* if given. + There is an additional mode character permitted, ``'U'``, which no longer + has any effect, and is considered deprecated. It previously enabled + :term:`universal newlines` in text mode, which became the default behaviour + in Python 3.0. Refer to the documentation of the + :ref:`newline <open-newline-parameter>` parameter for further details. + .. note:: Python doesn't depend on the underlying operating system's notion of text @@ -1246,6 +1252,10 @@ are always available. They are listed here in alphabetical order. * The file is now non-inheritable. + .. deprecated-removed:: 3.4 3.10 + + The ``'U'`` mode. + .. versionchanged:: 3.5 @@ -1261,10 +1271,6 @@ are always available. They are listed here in alphabetical order. * On Windows, opening a console buffer may return a subclass of :class:`io.RawIOBase` other than :class:`io.FileIO`. - .. versionchanged:: 3.9 - The ``'U'`` mode has been removed. - - .. function:: ord(c) Given a string representing one Unicode character, return an integer |