Michael Foord <mich...@voidspace.org.uk> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11647>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to