MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / copy

Method copy

tools/python-3.11.9-amd64/Lib/weakref.py:169–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

167 self.data[key] = KeyedRef(value, self._remove, key)
168
169 def copy(self):
170 if self._pending_removals:
171 self._commit_removals()
172 new = WeakValueDictionary()
173 with _IterationGuard(self):
174 for key, wr in self.data.items():
175 o = wr()
176 if o is not None:
177 new[key] = o
178 return new
179
180 __copy__ = copy
181

Callers 1

__or__Method · 0.95

Calls 4

_commit_removalsMethod · 0.95
_IterationGuardClass · 0.90
WeakValueDictionaryClass · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected