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 <rep...@bugs.python.org> <http://bugs.python.org/issue16596> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com