MCPcopy Create free account
hub / github.com/MagicStack/contextvars / copy

Method copy

contextvars/__init__.py:43–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 self._prev_context = None
42
43 def copy(self):
44 new = Context()
45 new._data = self._data
46 return new
47
48 def __getitem__(self, var):
49 if not isinstance(var, ContextVar):

Callers 2

copy_contextFunction · 0.80
ctx1_funMethod · 0.80

Calls 1

ContextClass · 0.85

Tested by 1

ctx1_funMethod · 0.64