A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-May/064679.html below:

[Python-Dev] More on contextlib - adding back a contextmanager decorator

[Python-Dev] More on contextlib - adding back a contextmanager decorator [Python-Dev] More on contextlib - adding back a contextmanager decoratorFredrik Lundh fredrik at pythonware.com
Mon May 1 13:39:26 CEST 2006
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>



More information about the Python-Dev mailing list

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