From: Georg Brandl Date: Tue, 13 Jul 2010 06:38:10 +0000 (+0000) Subject: Add bytes in literal_eval doc. X-Git-Tag: v3.2a1~205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85f2177f6d73bad4a2f84f41db8284216ce5eda1;p=thirdparty%2FPython%2Fcpython.git Add bytes in literal_eval doc. --- diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 43c9add14289..5e2336f235dc 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)