Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 05bfcc5

Browse files
committed
#7935: cross-reference to ast.literal_eval() from eval() docs.
1 parent 492f3fc commit 05bfcc5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Doc/library/functions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ are always available. They are listed here in alphabetical order.
335335
returns the current global and local dictionary, respectively, which may be
336336
useful to pass around for use by :func:`eval` or :func:`exec`.
337337

338+
See :func:`ast.literal_eval` for a function that can safely evaluate strings
339+
with expressions containing only literals.
340+
338341

339342
.. function:: exec(object[, globals[, locals]])
340343

0 commit comments

Comments
 (0)