[Python-checkins] r76230 - in python/trunk: Doc/library/functions.rst Lib/test/test_codeop.py Lib/test/test_compile.py Lib/test/test_parser.py Misc/NEWS Parser/parsetok.c Parser/tokenizer.c Parser/tokenizer.h

Georg Brandl g.brandl at gmx.net
Fri Nov 13 22:20:53 CET 2009


benjamin.peterson schrieb:

> Modified: python/trunk/Doc/library/functions.rst
> ==============================================================================
> --- python/trunk/Doc/library/functions.rst	(original)
> +++ python/trunk/Doc/library/functions.rst	Fri Nov 13 00:39:44 2009
> @@ -173,11 +173,10 @@
>  
>     .. 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.

Multi-line statements in "eval" mode?

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-checkins mailing list