MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _StrongRef

Class _StrongRef

lib/matplotlib/cbook.py:119–134  ·  view source on GitHub ↗

Wrapper similar to a weakref, but keeping a strong reference to the object.

Source from the content-addressed store, hash-verified

117
118
119class _StrongRef:
120 """
121 Wrapper similar to a weakref, but keeping a strong reference to the object.
122 """
123
124 def __init__(self, obj):
125 self._obj = obj
126
127 def __call__(self):
128 return self._obj
129
130 def __eq__(self, other):
131 return isinstance(other, _StrongRef) and self._obj == other._obj
132
133 def __hash__(self):
134 return hash(self._obj)
135
136
137def _weak_or_strong_ref(func, callback):

Callers 1

_weak_or_strong_refFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…