diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-08-15 15:15:39 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-08-15 15:15:39 (GMT) |
commit | 5618aaaafeb18e49cb80ce28c63407db48d12c4b (patch) | |
tree | 554b053d682f4aae066447cb953e74c2ebc93e30 /Doc/whatsnew/2.3.rst | |
parent | 2d44ceeada8840185217c7de826622d8372ceb00 (diff) | |
download | cpython-5618aaaafeb18e49cb80ce28c63407db48d12c4b.zip cpython-5618aaaafeb18e49cb80ce28c63407db48d12c4b.tar.gz cpython-5618aaaafeb18e49cb80ce28c63407db48d12c4b.tar.bz2 |
#15543: glossary entry for and 'universal newlines', and links to it.
Patch by Chris Jerdonek.
Diffstat (limited to 'Doc/whatsnew/2.3.rst')
-rw-r--r-- | Doc/whatsnew/2.3.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/whatsnew/2.3.rst b/Doc/whatsnew/2.3.rst index b034eb2..fbde6e5 100644 --- a/Doc/whatsnew/2.3.rst +++ b/Doc/whatsnew/2.3.rst @@ -366,6 +366,9 @@ Under MacOS, :func:`os.listdir` may now return Unicode filenames. .. ====================================================================== +.. index:: + single: universal newlines; What's new + PEP 278: Universal Newline Support ================================== @@ -378,7 +381,8 @@ two-character sequence of a carriage return plus a newline. Python's file objects can now support end of line conventions other than the one followed by the platform on which Python is running. Opening a file with the -mode ``'U'`` or ``'rU'`` will open a file for reading in universal newline mode. +mode ``'U'`` or ``'rU'`` will open a file for reading in +:term:`universal newlines` mode. All three line ending conventions will be translated to a ``'\n'`` in the strings returned by the various file methods such as :meth:`read` and :meth:`readline`. |