[New-bugs-announce] [issue13814] Generators as context managers.

Arkadiusz Wahlig report at bugs.python.org
Wed Jan 18 11:43:16 CET 2012

New submission from Arkadiusz Wahlig <arkadiusz.wahlig at gmail.com>:

Generators should support the with statement with __exit__ calling self.close().

with genfunc() as g:
    for item in g:

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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list