New submission from Arkadiusz Wahlig <[email protected]>:
Generators should support the with statement with __exit__ calling self.close().
with genfunc() as g:
for item in g:
print(item)
----------
messages: 151530
nosy: yak
priority: normal
severity: normal
status: open
title: Generators as context managers.
type: enhancement
versions: Python 2.7, Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13814>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com