From the copy documentation:
Classes can use the same interfaces to control copying that they use to control pickling.
[...]
In order for a class to define its own copy implementation, it can define special methods
__copy__()and__deepcopy__()
So which one is it? __setstate__() and __getstate__() that are used when pickling, or __copy__() and __deepcopy__()?