From 05bfcc590d1ddd7b2638075ce3db2d78d007e1d5 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 11 Jul 2010 09:42:10 +0000 Subject: [PATCH] #7935: cross-reference to ast.literal_eval() from eval() docs. --- Doc/library/functions.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 8089df15a2..8a413f4bc8 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]]) -- 2.50.1