MCPcopy Index your code
hub / github.com/RustPython/RustPython / update

Method update

Lib/weakref.py:410–418  ·  view source on GitHub ↗
(self, dict=None, /, **kwargs)

Source from the content-addressed store, hash-verified

408 return self.data.setdefault(ref(key, self._remove),default)
409
410 def update(self, dict=None, /, **kwargs):
411 d = self.data
412 if dict is not None:
413 if not hasattr(dict, "items"):
414 dict = type({})(dict)
415 for key, value in dict.items():
416 d[ref(key, self._remove)] = value
417 if len(kwargs):
418 self.update(kwargs)
419
420 def __ior__(self, other):
421 self.update(other)

Callers 6

__init__Method · 0.95
__ior__Method · 0.95
__or__Method · 0.45
__ror__Method · 0.45
__or__Method · 0.45
__ror__Method · 0.45

Calls 3

hasattrFunction · 0.85
lenFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected