Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/ast.rst

    r2 r391  
    1 .. _ast:
    2 
    3 Abstract Syntax Trees
    4 =====================
     1:mod:`ast` --- Abstract Syntax Trees
     2====================================
    53
    64.. module:: ast
     
    1614   The high-level ``ast`` module containing all helpers.
    1715
     16**Source code:** :source:`Lib/ast.py`
     17
     18--------------
    1819
    1920The :mod:`ast` module helps Python applications to process trees of the Python
     
    123124and classes for traversing abstract syntax trees:
    124125
    125 .. function:: parse(expr, filename='<unknown>', mode='exec')
    126 
    127    Parse an expression into an AST node.  Equivalent to ``compile(expr,
     126.. function:: parse(source, filename='<unknown>', mode='exec')
     127
     128   Parse the source into an AST node.  Equivalent to ``compile(source,
    128129   filename, mode, ast.PyCF_ONLY_AST)``.
    129130
     
    131132.. function:: literal_eval(node_or_string)
    132133
    133    Safely evaluate an expression node or a string containing a Python
    134    expression.  The string or node provided may only consist of the following
    135    Python literal structures: strings, numbers, tuples, lists, dicts, booleans,
    136    and ``None``.
     134   Safely evaluate an expression node or a Unicode or *Latin-1* encoded string
     135   containing a Python expression.  The string or node provided may only consist
     136   of the following Python literal structures: strings, numbers, tuples, lists,
     137   dicts, booleans, and ``None``.
    137138
    138139   This can be used for safely evaluating strings containing Python expressions
     
    183184.. function:: walk(node)
    184185
    185    Recursively yield all child nodes of *node*, in no specified order.  This is
    186    useful if you only want to modify nodes in place and don't care about the
    187    context.
     186   Recursively yield all descendant nodes in the tree starting at *node*
     187   (including *node* itself), in no specified order.  This is useful if you only
     188   want to modify nodes in place and don't care about the context.
    188189
    189190
Note: See TracChangeset for help on using the changeset viewer.