Message361998
> 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 |
|
| Date |
User |
Action |
Args |
| 2020-02-14 21:13:46 | BTaskaya | set | recipients:
+ BTaskaya, rhettinger |
| 2020-02-14 21:13:46 | BTaskaya | set | messageid: <[email protected]> |
| 2020-02-14 21:13:46 | BTaskaya | link | issue39159 messages |
| 2020-02-14 21:13:46 | BTaskaya | create | |
|