Daniel Lenski <[email protected]> added the comment: Davide, the @contextlib.contextmanager decorator effectively wraps the yield statement in the necessary glue so that everything prior to the yield statement occurs in the __enter__() method of the contextmanager, while everything subsequent occurs in the __exit__() method.
On Sat, Jun 30, 2012 at 1:46 AM, Davide Rizzo <[email protected]>wrote: > > Davide Rizzo <[email protected]> added the comment: > > Daniel, Nick, shouldn't the context manager yield f within a with block? > > ---------- > nosy: +davide.rizzo > > _______________________________________ > Python tracker <[email protected]> > <http://bugs.python.org/issue14243> > _______________________________________ > ---------- title: tempfile.NamedTemporaryFile not particularly useful on Windows -> tempfile.NamedTemporaryFile not particularly useful on Windows _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue14243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
