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

Method __deepcopy__

lib/matplotlib/path.py:278–291  ·  view source on GitHub ↗

Return a deepcopy of the `Path`. The `Path` will not be readonly, even if the source `Path` is.

(self, memo)

Source from the content-addressed store, hash-verified

276 return copy.copy(self)
277
278 def __deepcopy__(self, memo):
279 """
280 Return a deepcopy of the `Path`. The `Path` will not be
281 readonly, even if the source `Path` is.
282 """
283 # Deepcopying arrays (vertices, codes) strips the writeable=False flag.
284 cls = type(self)
285 memo[id(self)] = p = cls.__new__(cls)
286
287 for k, v in self.__dict__.items():
288 setattr(p, k, copy.deepcopy(v, memo))
289
290 p._readonly = False
291 return p
292
293 def deepcopy(self, memo=None):
294 """

Callers

nothing calls this directly

Calls 2

deepcopyMethod · 0.80
__new__Method · 0.45

Tested by

no test coverage detected