def test_callapi(self): f = io.BytesIO() # With and without keyword arguments pickle.dump(123, f, -1) pickle.dump(123, file=f, protocol=-1) pickle.dumps(123, -1) pickle.dumps(123, protocol=-1) pickle.Pickler(f, -1) pickle.Pickler(f, protocol=-1)
def dumps(obj, protocol=2): return b64encode(serializer.dumps(obj, protocol))
def dumps(obj): return serializer.dumps(obj, protocol=2)
def dumps(obj, protocol=2): l = serializer.dumps(obj, protocol) return l
def dumps(self, arg, proto=3, fast=0): if proto != 3: return pickle.dumps(arg, protocol=proto) else: return self._dumps(arg)