Author ncoghlan
Recipients ncoghlan
Date 2018-05-11.22:31:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za>
In-reply-to
Content
The current example for contextlib.contextmanager doesn't use try/finally, which sets folks up for writing resource management context managers that don't clean up after exceptions properly.

There's an example with try/finally down in the contextlib.closing docs, but I'm thinking it would be worthwhile to change the presentation of contextmanager itself.
History
Date User Action Args
2018-05-11 22:31:27ncoghlansetrecipients: + ncoghlan
2018-05-11 22:31:27ncoghlansetmessageid: <1526077887.55.0.682650639539.issue33468@psf.upfronthosting.co.za>
2018-05-11 22:31:27ncoghlanlinkissue33468 messages
2018-05-11 22:31:27ncoghlancreate