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 michael.foord
Recipients michael.foord, ncoghlan, pitrou, ysj.ray
Date 2011-03-26.00:15:21
SpamBayes Score 1.2119719e-07
Marked as misclassified No
Message-id <1301098522.23.0.816404790797.issue11647@psf.upfronthosting.co.za>
In-reply-to
Content
I'm strongly with Antoine on this. If you use context manager as a decorator you should be able to reuse it - and in general both generators and context managers can be reused and so I don't understand the phrase 'moral equivalent of the implicit context manager'.

If having APIs that can be used as context managers *and* decorators is a useful thing (and usage in django, py.test and mock seems to show that it is) then this functionality should be provided.
History
Date User Action Args
2011-03-26 00:15:22michael.foordsetrecipients: + michael.foord, ncoghlan, pitrou, ysj.ray
2011-03-26 00:15:22michael.foordsetmessageid: <1301098522.23.0.816404790797.issue11647@psf.upfronthosting.co.za>
2011-03-26 00:15:21michael.foordlinkissue11647 messages
2011-03-26 00:15:21michael.foordcreate