Please file this in the bug tracker. Thanks for finding this -- I kew there was a problem with the debugger losing control but I never traced it down to the with statement!
On 10/11/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > I 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 > > > Christian > > _______________________________________________ > Python-3000 mailing list > Python-3000@python.org > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: > http://mail.python.org/mailman/options/python-3000/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com