MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / setcontext

Function setcontext

tools/python-3.11.9-amd64/Lib/_pydecimal.py:462–467  ·  view source on GitHub ↗

Set this thread's context to context.

(context)

Source from the content-addressed store, hash-verified

460 return context
461
462def setcontext(context):
463 """Set this thread's context to context."""
464 if context in (DefaultContext, BasicContext, ExtendedContext):
465 context = context.copy()
466 context.clear_flags()
467 _current_context_var.set(context)
468
469del contextvars # Don't contaminate the namespace
470

Callers 2

__enter__Method · 0.85
__exit__Method · 0.85

Calls 3

clear_flagsMethod · 0.80
copyMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected