Greg Ewing wrote: > I've been thinking about the terms "guarded context" > and "context guard". We could say that the with-statement > executes its body in a guarded context (an abstract > notion, not a concrete object). To do this, it creates > a context guard (a concrete object) with __enter__ > and __exit__ methods that set up and tear down the > guarded context. This seems clearer to me, since I > can more readily visualise a "guard" object being > specially commissioned to deal with one particular > job (guarding a particular invocation of a context). > > With only one object, there wouldn't be a need for any more > terms. contrast and compare: http://pyref.infogami.com/with http://pyref.infogami.com/with-alt http://pyref.infogami.com/with-guard a distinct term for "whatever the __enter__ method returns" (i.e. the thing assigned to the target list) would still be nice. </F>
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