[issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context

Xavier de Gaye report at bugs.python.org
Wed Nov 20 23:02:54 CET 2013


Xavier de Gaye added the comment:

Hopefully issue16596_nostate_4.diff should fix this.
The patch issues a StopIteration debug event in ceval.c (similar to the change made in the previous
patch for the for loop), when the subgenerator is exhausted. This debug event is printed as
'Internal StopIteration' by pdb to indicate that it is not a real user exception. Two tests have
been added: test 'next' when returning from a generator in a for loop and 'test' next when returning
from a subgenerator.

----------
Added file: http://bugs.python.org/file32735/issue16596_nostate_4.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16596>
_______________________________________


More information about the Python-bugs-list mailing list