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

Method __init__

Lib/weakref.py:309–320  ·  view source on GitHub ↗
(self, dict=None)

Source from the content-addressed store, hash-verified

307 """
308
309 def __init__(self, dict=None):
310 self.data = {}
311 def remove(k, selfref=ref(self)):
312 self = selfref()
313 if self is not None:
314 try:
315 del self.data[k]
316 except KeyError:
317 pass
318 self._remove = remove
319 if dict is not None:
320 self.update(dict)
321
322 def __delitem__(self, key):
323 del self.data[ref(key)]

Callers

nothing calls this directly

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected