Terry Reedy a écrit :
> So I propose that the context maker be called just that: 'context maker'. 
> That should pretty clearly not be the context that manages the block 
> execution.
> 
+1 for context maker. In fact, after reading the begining of the thread, I came 
  up with the very same idea.

> Similar, a context_maker function could be named any of 'context_maker', 
> 'context_manager', or 'context', with the latter two referring to the 
> return value.  In the context of 'with ____ as name:', either of the latter 
> two reads better to me.
> 
> I would call the decorator @contextmaker since that is what it turns the 
> decorated function into.
> 
I'm confused here. Do we agree that the object with __enter__ and __exit__ is a 
context manager, and the object with just __context__ is a context maker ?
If so , I would say the decorator still produces a context manager.

Baptiste

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to