Serhiy Storchaka added the comment:

Thank you for your explanation Wolfgang! Now it is clear to me. The issue is 
that the generator calls the close() method of the subgenerator, but if the 
subgenerator is a file, the close() method closes (surprise!) the file. Two 
different protocols use the same method.

Interesting, how many similar bugs was introduced by blindly replacing 
"for/yield" with "yield from"?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23700>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to