Kaydet (Commit) 85f2177f authored tarafından Georg Brandl's avatar Georg Brandl

Add bytes in literal_eval doc.

üst 94628eeb
...@@ -119,14 +119,14 @@ and classes for traversing abstract syntax trees: ...@@ -119,14 +119,14 @@ and classes for traversing abstract syntax trees:
Safely evaluate an expression node or a string containing a Python Safely evaluate an expression node or a string containing a Python
expression. The string or node provided may only consist of the following expression. The string or node provided may only consist of the following
Python literal structures: strings, numbers, tuples, lists, dicts, sets, Python literal structures: strings, bytes, numbers, tuples, lists, dicts,
booleans, and ``None``. sets, booleans, and ``None``.
This can be used for safely evaluating strings containing Python expressions This can be used for safely evaluating strings containing Python expressions
from untrusted sources without the need to parse the values oneself. from untrusted sources without the need to parse the values oneself.
.. versionchanged:: 3.2 .. versionchanged:: 3.2
Now allows set literals. Now allows bytes and set literals.
.. function:: get_docstring(node, clean=True) .. function:: get_docstring(node, clean=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment