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

Method __init__

python/pyfory/lib/collection.py:49–66  ·  view source on GitHub ↗
(self, dict=None)

Source from the content-addressed store, hash-verified

47 """
48
49 def __init__(self, dict=None):
50 self.data = {}
51
52 def remove(k, selfref=IdentityWeakRef(self)):
53 self = selfref()
54 if self is not None:
55 if self._iterating:
56 self._pending_removals.append(k)
57 else:
58 del self.data[k]
59
60 self._remove = remove
61 # A list of dead weakrefs (keys to be removed)
62 self._pending_removals = []
63 self._iterating = set()
64 self._dirty_len = False
65 if dict is not None:
66 self.update(dict)
67
68 def _scrub_removals(self):
69 d = self.data

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
setFunction · 0.50

Tested by

no test coverage detected