summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-13 00:17:59 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-13 00:17:59 (GMT)
commitaeaa592516c8ea8a0a6318f69635baa817ced82f (patch)
tree7b082d501188cc6acc44469e7f33a766c51d9d55 /Doc/library/functions.rst
parenta1d23326b19a0182ef74aae32386c5119b1a6e39 (diff)
downloadcpython-aeaa592516c8ea8a0a6318f69635baa817ced82f.zip
cpython-aeaa592516c8ea8a0a6318f69635baa817ced82f.tar.gz
cpython-aeaa592516c8ea8a0a6318f69635baa817ced82f.tar.bz2
Merged revisions 76230 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76230 | benjamin.peterson | 2009-11-12 17:39:44 -0600 (Thu, 12 Nov 2009) | 2 lines fix several compile() issues by translating newlines in the tokenizer ........
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 6008e97..7eb838a 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -176,11 +176,15 @@ are always available. They are listed here in alphabetical order.
.. note::
- When compiling a string with multi-line statements, line endings must be
- represented by a single newline character (``'\n'``), and the input must
- be terminated by at least one newline character. If line endings are
- represented by ``'\r\n'``, use :meth:`str.replace` to change them into
- ``'\n'``.
+ When compiling a string with multi-line statements in ``'single'`` or
+ ``'eval'`` mode, input must be terminated by at least one newline
+ character. This is to facilitate detection of incomplete and complete
+ statements in the :mod:`code` module.
+
+
+ .. versionchanged:: 3.2
+ Allowed use of Windows and Mac newlines. Also input in ``'exec'`` mode
+ does not have to end in a newline anymore.
.. function:: complex([real[, imag]])