New submission from beda pišl :
Consider simple script:
```
for i in range(1):
import pdb
pdb.set_trace()
x = y + z
```
After running it and pressing 'c' to continue:
```
test$ python test.py
> /Users/bedrich.pisl/test/test.py(1)()
-> for i in range(1):
(Pdb) c
```
I get error, but with wrong error line
```
Traceback (most recent call last):
File "/Users/bedrich.pisl/test/test.py", line 1, in
for i in range(1):
NameError: name 'y' is not defined
```
The error is actually on line 5 not 1.
--
components: Library (Lib)
messages: 409434
nosy: bedapisl
priority: normal
severity: normal
status: open
title: Wrong error line after using pdb
type: behavior
versions: Python 3.9
___
Python tracker
<https://bugs.python.org/issue46215>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com