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> _______________________________________________ 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