summaryrefslogtreecommitdiffstats
path: root/Doc/library/ast.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-11 09:41:21 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-11 09:41:21 (GMT)
commit492f3fc272a3b3e941f0911a1ef722065c58452e (patch)
treeef0c03388315f50c310fc87766fec3aee337c64e /Doc/library/ast.rst
parente40ee509e35edd7dcab4009c4a65efc626527bb8 (diff)
downloadcpython-492f3fc272a3b3e941f0911a1ef722065c58452e.zip
cpython-492f3fc272a3b3e941f0911a1ef722065c58452e.tar.gz
cpython-492f3fc272a3b3e941f0911a1ef722065c58452e.tar.bz2
Allow set literals in literal_eval().
Diffstat (limited to 'Doc/library/ast.rst')
-rw-r--r--Doc/library/ast.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 9bf374f..43c9add 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -119,12 +119,15 @@ and classes for traversing abstract syntax trees:
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, numbers, tuples, lists, dicts, booleans,
- and ``None``.
+ Python literal structures: strings, 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.
+ .. versionchanged:: 3.2
+ Now allows set literals.
+
.. function:: get_docstring(node, clean=True)