[Python-Dev] More on contextlib - adding back a contextmanager decorator (original) (raw)
Phillip J. Eby pje at telecommunity.com
Mon May 1 17:28:58 CEST 2006
- Previous message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Next message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Next message: [Python-Dev] More on contextlib - adding back a contextmanager decorator
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]