This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dlenski
Recipients brian.curtin, dabrahams, davide.rizzo, dlenski, eric.araujo, eric.smith, jaraco, ncoghlan, pitrou, r.david.murray, sbt, tim.golden
Date 2012-06-30.23:01:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAOw_LSGBiSkO2aDHbwoe6AGBUWxOcaPe9FkrCJx23Rtm2gG3Yw@mail.gmail.com>
In-reply-to <1341045988.98.0.559965486608.issue14243@psf.upfronthosting.co.za>
Content
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 <report@bugs.python.org>wrote:

>
> Davide Rizzo <sorcio@gmail.com> added the comment:
>
> Daniel, Nick, shouldn't the context manager yield f within a with block?
>
> ----------
> nosy: +davide.rizzo
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue14243>
> _______________________________________
>
History
Date User Action Args
2012-06-30 23:01:53dlenskisetrecipients: + dlenski, jaraco, ncoghlan, pitrou, eric.smith, tim.golden, eric.araujo, r.david.murray, brian.curtin, dabrahams, davide.rizzo, sbt
2012-06-30 23:01:52dlenskilinkissue14243 messages
2012-06-30 23:01:52dlenskicreate