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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4