[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-29 Thread Hannan Aharonov
Hannan Aharonov added the comment: OK. Thanks. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-28 Thread Nick Coghlan
Nick Coghlan added the comment: This is expected behaviour - "raise StopIteration" in a generator is equivalent to "return", except it can occur inside a called function. The bug here is in the given context manager definition - it should be taking appropriate action if the "next" call failing

[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-28 Thread Hannan Aharonov
Changes by Hannan Aharonov : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-28 Thread Hannan Aharonov
New submission from Hannan Aharonov: If the code that defines a context manager performs some operations on a generator that cause it to raise StopIteration, this exception is propagated to the context manager's __exit__() method and there swallowed by a try..except block. This can cause une