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

Method update

Lib/weakref.py:235–243  ·  view source on GitHub ↗
(self, other=None, /, **kwargs)

Source from the content-addressed store, hash-verified

233 return o
234
235 def update(self, other=None, /, **kwargs):
236 d = self.data
237 if other is not None:
238 if not hasattr(other, "items"):
239 other = dict(other)
240 for key, o in other.items():
241 d[key] = KeyedRef(o, self._remove, key)
242 for key, o in kwargs.items():
243 d[key] = KeyedRef(o, self._remove, key)
244
245 def valuerefs(self):
246 """Return a list of weak references to the values.

Callers 3

__init__Method · 0.95
__ior__Method · 0.95

Calls 2

KeyedRefClass · 0.70
itemsMethod · 0.45

Tested by 1