mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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 ........
This commit is contained in:
parent
a1d23326b1
commit
aeaa592516
8 changed files with 106 additions and 35 deletions
|
@ -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]])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue