[docs] [issue31778] ast.literal_eval supports non-literals in Python 3

Serhiy Storchaka report at bugs.python.org
Wed Oct 18 08:01:29 EDT 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

"""
The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, and None.
"""

1+1 is not a literal number.

"""
It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing.
"""

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31778>
_______________________________________


More information about the docs mailing list