[Python-Dev] More on contextlib - adding back a contextmanager decorator
Phillip J. Eby
pje at telecommunity.com
Mon May 1 17:28:58 CEST 2006
At 08:29 PM 5/1/2006 +1000, Nick Coghlan wrote:
>'localcontext' would probably work as at least an interim name for such a
>function.
>
> with decimal.localcontext() as ctx:
> # use the new context here
And the "as ctx" should be unnecessary for most use cases, if localcontext
has an appropriately designed API.
More information about the Python-Dev
mailing list