[Python-checkins] cpython (3.3): Cleanup of documentation change from #17860
ronald.oussoren
python-checkins at python.org
Sun Jul 7 09:28:16 CEST 2013
http://hg.python.org/cpython/rev/f4747e1ce2b1
changeset: 84476:f4747e1ce2b1
branch: 3.3
parent: 84467:b8028f74bac4
user: Ronald Oussoren <ronaldoussoren at mac.com>
date: Sun Jul 07 09:26:45 2013 +0200
summary:
Cleanup of documentation change from #17860
Reformulated the textual change, and applied it to the docstring as well.
files:
Doc/library/subprocess.rst | 11 +++++++----
Lib/subprocess.py | 3 +++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -290,11 +290,14 @@
.. index::
single: universal newlines; subprocess module
- If *universal_newlines* is ``True``, the file objects *stdin*, *stdout* and
- *stderr* will be opened as text streams in :term:`universal newlines` mode
+ If *universal_newlines* is ``False`` the file objects *stdin*, *stdout* and
+ *stderr* will be opened as binary streams, and no line ending conversion is
+ done.
+
+ If *universal_newlines* is ``True``, these file objects
+ will be opened as text streams in :term:`universal newlines` mode
using the encoding returned by :func:`locale.getpreferredencoding(False)
- <locale.getpreferredencoding>`, otherwise these streams will be opened
- as binary streams. For *stdin*, line ending characters
+ <locale.getpreferredencoding>`. For *stdin*, line ending characters
``'\n'`` in the input will be converted to the default line separator
:data:`os.linesep`. For *stdout* and *stderr*, all line endings in the
output will be converted to ``'\n'``. For more information see the
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -104,6 +104,9 @@
If env is not None, it defines the environment variables for the new
process.
+If universal_newlines is false, the file objects stdin, stdout and stderr
+are opened as binary files, and no line ending conversion is done.
+
If universal_newlines is true, the file objects stdout and stderr are
opened as a text files, but lines may be terminated by any of '\n',
the Unix end-of-line convention, '\r', the old Macintosh convention or
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list