New submission from Christian Heimes:

found a pretty annoying bug caused by with blocks. A with block
terminates the debugging session and the program keeps running. It's not
possible to go to the next line with 'n'. 's' steps into the open() call.

# pdbtest.py
import pdb
pdb.set_trace()
print("before with")
with open("/etc/passwd") as fd:
    data = fd.read()
print("after with")
print("end of program")

$ ./python pdbtest.py
> /home/heimes/dev/python/py3k/pdbtest.py(3)<module>()
-> print("before with")
(Pdb) n
before with
> /home/heimes/dev/python/py3k/pdbtest.py(4)<module>()
-> with open("/etc/passwd") as fd:
(Pdb) n
after with
end of program

----------
components: Interpreter Core, Library (Lib)
messages: 56346
nosy: tiran
severity: normal
status: open
title: pdb bug with "with" statement
versions: Python 3.0

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1265>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to