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

Method __init__

Lib/weakref.py:104–113  ·  view source on GitHub ↗
(self, other=(), /, **kw)

Source from the content-addressed store, hash-verified

102 # way in).
103
104 def __init__(self, other=(), /, **kw):
105 def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
106 self = selfref()
107 if self is not None:
108 # Atomic removal is necessary since this function
109 # can be called asynchronously by the GC
110 _atomic_removal(self.data, wr.key)
111 self._remove = remove
112 self.data = {}
113 self.update(other, **kw)
114
115 def __getitem__(self, key):
116 o = self.data[key]()

Callers

nothing calls this directly

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected