Why `set` object’s do not use `__newobj__` function to unpickle like other built-in container types?
I am recently writing a batch of customized container classes which are mostly inherited from built-in list
, dict
and set
types, and I surprising encountered an error, a class inherited from built-in set
will raise exception when copied using copy
module’s copy
and deepcopy
function, while other classes works fine.
Why `set` object’s does not use `__newobj__` function to unpickle like other built-in container types?
I am recently writing a batch of customized container classes which are mostly inherited from built-in list
, dict
and set
types, and I surprising encountered an error, a class inherited from built-in set
will raise exception when copied using copy
module’s copy
and deepcopy
function, while other classes works fine.