summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-31 09:39:29 (GMT)
committerGeorg Brandl <georg@python.org>2014-10-31 09:39:29 (GMT)
commite21a531ef10e120a94434b3d4806a8106dd6f271 (patch)
tree0b1d0245388effa5cbf130744b50af6ab6a1eb5f /Doc/library/functions.rst
parentfe98180bced16be7d62b762cc85d400f929d0885 (diff)
parenta4c8c47961305487ef6c40a6d882bb956f2c5a0b (diff)
downloadcpython-e21a531ef10e120a94434b3d4806a8106dd6f271.zip
cpython-e21a531ef10e120a94434b3d4806a8106dd6f271.tar.gz
cpython-e21a531ef10e120a94434b3d4806a8106dd6f271.tar.bz2
merge with 3.4
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 047c448..9e38d6f 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -211,7 +211,7 @@ are always available. They are listed here in alphabetical order.
The optional arguments *flags* and *dont_inherit* control which future
statements (see :pep:`236`) affect the compilation of *source*. If neither
is present (or both are zero) the code is compiled with those future
- statements that are in effect in the code that is calling compile. If the
+ statements that are in effect in the code that is calling :func:`compile`. If the
*flags* argument is given and *dont_inherit* is not (or is zero) then the
future statements specified by the *flags* argument are used in addition to
those that would be used anyway. If *dont_inherit* is a non-zero integer then
@@ -232,6 +232,9 @@ are always available. They are listed here in alphabetical order.
This function raises :exc:`SyntaxError` if the compiled source is invalid,
and :exc:`TypeError` if the source contains null bytes.
+ If you want to parse Python code into its AST representation, see
+ :func:`ast.parse`.
+
.. note::
When compiling a string with multi-line code in ``'single'`` or
@@ -540,7 +543,7 @@ are always available. They are listed here in alphabetical order.
effect as calling :func:`str(value) <str>`.
A call to ``format(value, format_spec)`` is translated to
- ``type(value).__format__(format_spec)`` which bypasses the instance
+ ``type(value).__format__(value, format_spec)`` which bypasses the instance
dictionary when searching for the value's :meth:`__format__` method. A
:exc:`TypeError` exception is raised if the method search reaches
:mod:`object` and the *format_spec* is non-empty, or if either the