[Python-checkins] cpython (2.7): #22613: fix several factual errors in builtin docs (thanks Jacques Ducasse)

georg.brandl python-checkins at python.org
Fri Oct 31 10:43:11 CET 2014


https://hg.python.org/cpython/rev/9e57654dfdcc
changeset:   93316:9e57654dfdcc
branch:      2.7
user:        Georg Brandl <georg at python.org>
date:        Fri Oct 31 09:41:46 2014 +0100
summary:
  #22613: fix several factual errors in builtin docs (thanks Jacques Ducasse)

files:
  Doc/library/functions.rst |  5 ++++-
  Doc/library/stdtypes.rst  |  8 +++-----
  2 files changed, 7 insertions(+), 6 deletions(-)


diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -218,7 +218,7 @@
    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
@@ -233,6 +233,9 @@
    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
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -433,8 +433,7 @@
 operations and higher than the comparisons; the unary operation ``~`` has the
 same priority as the other unary numeric operations (``+`` and ``-``).
 
-This table lists the bitwise operations sorted in ascending priority
-(operations in the same box have the same priority):
+This table lists the bitwise operations sorted in ascending priority:
 
 +------------+--------------------------------+----------+
 | Operation  | Result                         | Notes    |
@@ -722,9 +721,8 @@
 ``*`` operations have the same priority as the corresponding numeric operations.
 [3]_ Additional methods are provided for :ref:`typesseq-mutable`.
 
-This table lists the sequence operations sorted in ascending priority
-(operations in the same box have the same priority).  In the table, *s* and *t*
-are sequences of the same type; *n*, *i* and *j* are integers:
+This table lists the sequence operations sorted in ascending priority.
+In the table, *s* and *t* are sequences of the same type; *n*, *i* and *j* are integers:
 
 +------------------+--------------------------------+----------+
 | Operation        | Result                         | Notes    |

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list