diff options
author | Georg Brandl <georg@python.org> | 2010-07-13 06:38:10 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-07-13 06:38:10 (GMT) |
commit | 85f2177f6d73bad4a2f84f41db8284216ce5eda1 (patch) | |
tree | e881bc8215dcf42fd2c1ede61ec5adaf075bdeca /Doc/library/ast.rst | |
parent | 94628eeb58b1ba95e967c0d338f57edbe71ee265 (diff) | |
download | cpython-85f2177f6d73bad4a2f84f41db8284216ce5eda1.zip cpython-85f2177f6d73bad4a2f84f41db8284216ce5eda1.tar.gz cpython-85f2177f6d73bad4a2f84f41db8284216ce5eda1.tar.bz2 |
Add bytes in literal_eval doc.
Diffstat (limited to 'Doc/library/ast.rst')
-rw-r--r-- | Doc/library/ast.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 43c9add..5e2336f 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -119,14 +119,14 @@ 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, sets, - booleans, and ``None``. + 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. .. versionchanged:: 3.2 - Now allows set literals. + Now allows bytes and set literals. .. function:: get_docstring(node, clean=True) |