summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-05 20:20:45 +0100
committerGeorg Brandl <georg@python.org>2014-11-05 20:20:45 +0100
commite6e54ab9b5538904c27bebb331aaab1e9c0077e1 (patch)
tree2f7ac4c0b183633e7cbf949136e196e2f0d7a264
parent81d9feee8d2bd85d2f61b99d5a4cf9a3251409de (diff)
parentb9b389efed16e31d657b047dd2f60817afd820ec (diff)
downloadcpython-git-e6e54ab9b5538904c27bebb331aaab1e9c0077e1.tar.gz
merge with 3.4
-rw-r--r--Doc/library/ast.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index daf28de29e..1ee5110211 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -115,13 +115,15 @@ and classes for traversing abstract syntax trees:
.. 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``.
-
- This can be used for safely evaluating strings containing Python expressions
- from untrusted sources without the need to parse the values oneself.
+ 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 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.