Message367363
Summary:
When you call ast.literal_eval on a string that does not contain valid Python code, it raises a SyntaxError. This causes pdb to exit instead of stopping execution at the point that the SyntaxError was raised.
To reproduce:
1. Create a Python file foo.py with these contents:
import ast
ast.literal_eval('')
2. Run python -m pdb foo.py
3. Type 'c' and hit enter.
Expected behavior:
pdb drops into a shell in ast.py at the point where the SyntaxError occurred.
Actual behavior:
The program exits, and a SyntaxError traceback is displayed.
System configuration:
Python 3.8.2 on Arch Linux. |
|
Date |
User |
Action |
Args |
2020-04-27 03:07:36 | Kerrick Staley | set | recipients:
+ Kerrick Staley |
2020-04-27 03:07:36 | Kerrick Staley | set | messageid: <1587956856.04.0.83965486478.issue40403@roundup.psfhosted.org> |
2020-04-27 03:07:35 | Kerrick Staley | link | issue40403 messages |
2020-04-27 03:07:35 | Kerrick Staley | create | |
|