Closed
Description
I hit this while working on yhat/ggpy#288
AbstractPathEffect
is composed of subclass of TransformNode
which raises an exception during deepcopy()
with the suggestion to use frozen()
, but there is no frozen()
in AbstractPathEffect
.
from matplotlib.patheffects import AbstractPathEffect
from copy import deepcopy
ape = AbstractPathEffect()
deepcopy(ape)
...
121 raise NotImplementedError(
122 "TransformNode instances can not be copied. " +
--> 123 "Consider using frozen() instead.")
124 __deepcopy__ = __copy__
125
but,
ape.frozen()
AttributeError: 'AbstractPathEffect' object has no attribute 'frozen'
I'm not familiar with TransformNode
, so this may be a naive question, but why not implement __deepcopy__
as frozen()
in that class?