Message132189
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. |
|
Date |
User |
Action |
Args |
2011-03-26 00:15:22 | michael.foord | set | recipients:
+ michael.foord, ncoghlan, pitrou, ysj.ray |
2011-03-26 00:15:22 | michael.foord | set | messageid: <1301098522.23.0.816404790797.issue11647@psf.upfronthosting.co.za> |
2011-03-26 00:15:21 | michael.foord | link | issue11647 messages |
2011-03-26 00:15:21 | michael.foord | create | |
|