MCPcopy Create free account
hub / github.com/apache/fory / update

Method update

python/pyfory/lib/collection.py:152–160  ·  view source on GitHub ↗
(self, dict=None, **kwargs)

Source from the content-addressed store, hash-verified

150 return self.data.setdefault(IdentityWeakRef(key, self._remove), default)
151
152 def update(self, dict=None, **kwargs):
153 d = self.data
154 if dict is not None:
155 if not hasattr(dict, "items"):
156 dict = type({})(dict)
157 for key, value in dict.items():
158 d[IdentityWeakRef(key, self._remove)] = value
159 if len(kwargs):
160 self.update(kwargs)
161
162
163class _IterationGuard:

Callers 1

__init__Method · 0.95

Calls 2

IdentityWeakRefClass · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected