summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-11 09:42:10 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-11 09:42:10 (GMT)
commit05bfcc590d1ddd7b2638075ce3db2d78d007e1d5 (patch)
treeeaaf6a0a76e42e701fa723c5c2198f03b8c13c63 /Doc
parent492f3fc272a3b3e941f0911a1ef722065c58452e (diff)
downloadcpython-05bfcc590d1ddd7b2638075ce3db2d78d007e1d5.zip
cpython-05bfcc590d1ddd7b2638075ce3db2d78d007e1d5.tar.gz
cpython-05bfcc590d1ddd7b2638075ce3db2d78d007e1d5.tar.bz2
#7935: cross-reference to ast.literal_eval() from eval() docs.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/functions.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 8089df1..8a413f4 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -335,6 +335,9 @@ are always available. They are listed here in alphabetical order.
returns the current global and local dictionary, respectively, which may be
useful to pass around for use by :func:`eval` or :func:`exec`.
+ See :func:`ast.literal_eval` for a function that can safely evaluate strings
+ with expressions containing only literals.
+
.. function:: exec(object[, globals[, locals]])