- Notifications
You must be signed in to change notification settings - Fork 183
Closed
Description
cloudpickle and cloudpickle_fast differ in the sense that the cloudpickle_fast's CloudPickler only has to reduce objects (the actual saving is taken care of by logic coded in the pickle.Pickler class), whereas the cloudpickle.CloudPickler reduces AND saves objects in one single method (save_{object_type}(self, obj))
Right now, the cloudpickle.CloudPickler reducing parts of the save_{object_type} methods do not use the reduce_{object_type} reducers implemented in cloudpickle_fast.
To avoid the need to write twice any change we make to a reducer, it would be great to refactor most cloudpickle.CloudPickler.save_* methods, to make them look like this
def save_{object_type}(self, obj): rv = reduce_{object_type}(obj) self.save_reduce(*rv, obj=obj)reduce_{object_type} being used both by cloudpickle and cloudpickle_fast.
Metadata
Metadata
Assignees
Labels
No labels