MCPcopy Index your code
hub / github.com/python/cpython / __enter__

Method __enter__

Lib/_pydecimal.py:3843–3846  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3841 def __init__(self, new_context):
3842 self.new_context = new_context.copy()
3843 def __enter__(self):
3844 self.saved_context = getcontext()
3845 setcontext(self.new_context)
3846 return self.new_context
3847 def __exit__(self, t, v, tb):
3848 setcontext(self.saved_context)
3849

Callers

nothing calls this directly

Calls 2

getcontextFunction · 0.85
setcontextFunction · 0.85

Tested by

no test coverage detected