Oct. 12, 2005
2:10 a.m.
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@canterbury.ac.nz +--------------------------------------+