[Python-Dev] Terminology for PEP 343

Ron Adam rrr at ronadam.com
Mon Jul 4 09:44:49 CEST 2005


Raymond Hettinger wrote:

> There is no value in expanding a concept to the point of being
> meaningless (i.e. meaning whatever you want it to or nothing at all).
> Instead, we need a phrase that expresses the essence of the following:
> 
> 
>         abc = EXPR
>         exc = (None, None, None)
>         VAR = abc.__enter__()
>         try:
>             try:
>                 BLOCK
>             except:
>                 exc = sys.exc_info()
>                 raise
>         finally:
>             abc.__exit__(*exc)
> 
> There is nothing in that that says resource managed.  The pre/post steps
> could do almost anything from logging, to changing environments, to
> translating, launching/joining unrelated threads, to communicating with
> other processes, etc.  

The name 'abc' is the manager object, so find a better term to replace 
'abc'.

Cheers,
Ron




More information about the Python-Dev mailing list