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

Method __setstate__

lib/matplotlib/cbook.py:288–298  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

286 }
287
288 def __setstate__(self, state):
289 cid_count = state.pop('_cid_gen')
290 vars(self).update(state)
291 self.callbacks = {
292 s: {cid: _weak_or_strong_ref(func, functools.partial(self._remove_proxy, s))
293 for cid, func in d.items()}
294 for s, d in self.callbacks.items()}
295 self._func_cid_map = _UnhashDict(
296 ((s, proxy), cid)
297 for s, d in self.callbacks.items() for cid, proxy in d.items())
298 self._cid_gen = itertools.count(cid_count)
299
300 def connect(self, signal, func):
301 """Register *func* to be called when signal *signal* is generated."""

Callers

nothing calls this directly

Calls 5

_weak_or_strong_refFunction · 0.85
_UnhashDictClass · 0.85
countMethod · 0.80
popMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected