import pickle
class Car:
def __init__(self, model, number):
print('Calling Car', (model, number), sep='')
self.model = model
self.number = number
def __reduce__(self):
return (Car, (self.model, self.number))
pickle.loads(pickle.dumps(Car('T', 5), protocol=pickle.HIGHEST_PROTOCOL))
aW1wb3J0IHBpY2tsZQoKY2xhc3MgQ2FyOgogICAgZGVmIF9faW5pdF9fKHNlbGYsIG1vZGVsLCBudW1iZXIpOgogICAgICAgIHByaW50KCdDYWxsaW5nIENhcicsIChtb2RlbCwgbnVtYmVyKSwgc2VwPScnKQogICAgICAgIHNlbGYubW9kZWwgPSBtb2RlbAogICAgICAgIHNlbGYubnVtYmVyID0gbnVtYmVyCiAgICBkZWYgX19yZWR1Y2VfXyhzZWxmKToKICAgICAgICByZXR1cm4gKENhciwgKHNlbGYubW9kZWwsIHNlbGYubnVtYmVyKSkKCnBpY2tsZS5sb2FkcyhwaWNrbGUuZHVtcHMoQ2FyKCdUJywgNSksIHByb3RvY29sPXBpY2tsZS5ISUdIRVNUX1BST1RPQ09MKSk=