[Python-checkins] cpython (merge 3.4 -> default): merge with 3.4

georg.brandl python-checkins at python.org
Wed Nov 5 20:22:45 CET 2014


https://hg.python.org/cpython/rev/ce07253e384f
changeset:   93400:ce07253e384f
parent:      93398:98ee59f61940
parent:      93399:5c5909740026
user:        Georg Brandl <georg at python.org>
date:        Wed Nov 05 20:20:45 2014 +0100
summary:
  merge with 3.4

files:
  Doc/library/ast.rst |  14 ++++++++------
  1 files changed, 8 insertions(+), 6 deletions(-)


diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -115,13 +115,15 @@
 
 .. function:: literal_eval(node_or_string)
 
-   Safely evaluate an expression node or a string containing a Python
-   expression.  The string or node provided may only consist of the following
-   Python literal structures: strings, bytes, numbers, tuples, lists, dicts,
-   sets, booleans, and ``None``.
+   Safely evaluate an expression node or a string containing a Python literal or
+   container display.  The string or node provided may only consist of the
+   following Python literal structures: strings, bytes, numbers, tuples, lists,
+   dicts, sets, booleans, and ``None``.
 
-   This can be used for safely evaluating strings containing Python expressions
-   from untrusted sources without the need to parse the values oneself.
+   This can be used for safely evaluating strings containing Python values from
+   untrusted sources without the need to parse the values oneself.  It is not
+   capable of evaluating arbitrarily complex expressions, for example involving
+   operators or indexing.
 
    .. versionchanged:: 3.2
       Now allows bytes and set literals.

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


More information about the Python-checkins mailing list