summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/2.3.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-15 15:11:27 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-08-15 15:11:27 (GMT)
commit27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169 (patch)
treed4a7886a29e92e4811c1087086aa30e1c27eb586 /Doc/whatsnew/2.3.rst
parent592df20efcc41d2448c8acc35b3b4f15aa5c0bf2 (diff)
parentee0a945ae4077d9e4ffdb77e247ed13265316897 (diff)
downloadcpython-27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169.zip
cpython-27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169.tar.gz
cpython-27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169.tar.bz2
Merge #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.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/whatsnew/2.3.rst b/Doc/whatsnew/2.3.rst
index 4cf9c4c..f0e48d9 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
==================================
@@ -376,12 +379,12 @@ mark the ends of lines in text files. Unix uses the linefeed (ASCII character
10), MacOS uses the carriage return (ASCII character 13), and Windows uses a
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.
-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`.
+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 :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`.
Universal newline support is also used when importing modules and when executing
a file with the :func:`execfile` function. This means that Python modules can