This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BTaskaya
Recipients BTaskaya, rhettinger
Date 2020-02-14.21:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
> 1) We should document possible exceptions that need to be caught.  So far, I've found TypeError, MemoryError, SyntaxError, ValueError.

Also, an addition to these errors is RecursionError
>>> t = ast.Tuple(elts=[], ctx=ast.Load())
>>> t.elts.append(t)
>>> ast.literal_eval(t)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/ast.py", line 101, in literal_eval
    return _convert(node_or_string)
  File "/usr/local/lib/python3.9/ast.py", line 81, in _convert
    return tuple(map(_convert, node.elts))
  File "/usr/local/lib/python3.9/ast.py", line 81, in _convert
    return tuple(map(_convert, node.elts))
  File "/usr/local/lib/python3.9/ast.py", line 81, in _convert
    return tuple(map(_convert, node.elts))
  [Previous line repeated 496 more times]
RecursionError: maximum recursion depth exceeded
History
Date User Action Args
2020-02-14 21:13:46BTaskayasetrecipients: + BTaskaya, rhettinger
2020-02-14 21:13:46BTaskayasetmessageid: <[email protected]>
2020-02-14 21:13:46BTaskayalinkissue39159 messages
2020-02-14 21:13:46BTaskayacreate