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

Method get_dict

Lib/_threading_local.py:36–40  ·  view source on GitHub ↗

Return the dict for the current thread. Raises KeyError if none defined.

(self)

Source from the content-addressed store, hash-verified

34 self.dicts = {}
35
36 def get_dict(self):
37 """Return the dict for the current thread. Raises KeyError if none
38 defined."""
39 thread = current_thread()
40 return self.dicts[id(thread)][1]
41
42 def create_dict(self):
43 """Create a new dict for the current thread, and return it."""

Callers 1

_patchFunction · 0.80

Calls 2

current_threadFunction · 0.90
idFunction · 0.85

Tested by

no test coverage detected