summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-15 14:43:58 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-08-15 14:43:58 (GMT)
commit1b00f25bf99d9b7a5f307984f6467258de636d23 (patch)
tree18d19d268ea3a642be447d3f7041211dc40f9379 /Doc/whatsnew
parentf748a3773fd40dd91195fc2fef2cac2f973baaf8 (diff)
downloadcpython-1b00f25bf99d9b7a5f307984f6467258de636d23.zip
cpython-1b00f25bf99d9b7a5f307984f6467258de636d23.tar.gz
cpython-1b00f25bf99d9b7a5f307984f6467258de636d23.tar.bz2
#15543: glossary entry for and 'universal newlines', and links to it.
Patch by Chris Jerdonek.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.3.rst6
-rw-r--r--Doc/whatsnew/2.4.rst5
-rw-r--r--Doc/whatsnew/2.5.rst8
-rw-r--r--Doc/whatsnew/2.6.rst5
4 files changed, 19 insertions, 5 deletions
diff --git a/Doc/whatsnew/2.3.rst b/Doc/whatsnew/2.3.rst
index 0cc29f6..f71422f 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`.
diff --git a/Doc/whatsnew/2.4.rst b/Doc/whatsnew/2.4.rst
index 09ff600..9d339a5 100644
--- a/Doc/whatsnew/2.4.rst
+++ b/Doc/whatsnew/2.4.rst
@@ -411,6 +411,9 @@ error streams will be. You can provide a file object or a file descriptor, or
you can use the constant ``subprocess.PIPE`` to create a pipe between the
subprocess and the parent.
+.. index::
+ single: universal newlines; What's new
+
The constructor has a number of handy options:
* *close_fds* requests that all file descriptors be closed before running the
@@ -424,7 +427,7 @@ The constructor has a number of handy options:
* *preexec_fn* is a function that gets called before the child is started.
* *universal_newlines* opens the child's input and output using Python's
- universal newline feature.
+ :term:`universal newlines` feature.
Once you've created the :class:`Popen` instance, you can call its :meth:`wait`
method to pause until the subprocess has exited, :meth:`poll` to check if it's
diff --git a/Doc/whatsnew/2.5.rst b/Doc/whatsnew/2.5.rst
index ff599c8..afe0f5e 100644
--- a/Doc/whatsnew/2.5.rst
+++ b/Doc/whatsnew/2.5.rst
@@ -1338,10 +1338,14 @@ complete list of changes, or look through the SVN logs for all the details.
.. XXX need to provide some more detail here
+ .. index::
+ single: universal newlines; What's new
+
* The :mod:`fileinput` module was made more flexible. Unicode filenames are now
supported, and a *mode* parameter that defaults to ``"r"`` was added to the
- :func:`input` function to allow opening files in binary or universal-newline
- mode. Another new parameter, *openhook*, lets you use a function other than
+ :func:`input` function to allow opening files in binary or
+ :term:`universal newlines` mode.
+ Another new parameter, *openhook*, lets you use a function other than
:func:`open` to open the input files. Once you're iterating over the set of
files, the :class:`FileInput` object's new :meth:`fileno` returns the file
descriptor for the currently opened file. (Contributed by Georg Brandl.)
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 6c5d630..a84bc19 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1071,9 +1071,12 @@ the :mod:`io` module:
The :class:`BytesIO` class supports reading, writing, and seeking
over an in-memory buffer.
+ .. index::
+ single: universal newlines; What's new
+
* :class:`TextIOBase`: Provides functions for reading and writing
strings (remember, strings will be Unicode in Python 3.0),
- and supporting universal newlines. :class:`TextIOBase` defines
+ and supporting :term:`universal newlines`. :class:`TextIOBase` defines
the :meth:`readline` method and supports iteration upon
objects.