[Python-Dev] Proposed changes to PEP 343

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Oct 12 04:10:27 CEST 2005

Jason Orendorff wrote:

>     A contextmanager is a function that returns a new context manager.
> Okay, that last bit is weird.

If the name of the decorator is to be 'contextmanager', it
really needs to say something like

   The contextmanager decorator turns a generator into a
   function that returns a context manager.

So maybe the decorator should be called 'contextmanagergenerator'.
Or perhaps not, since that's getting rather too much of an
eyeful to parse...

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list