def dumps(self, arg, proto=0): from zodbpickle import _pickle f = self.output() try: p = _pickle.Pickler(f, proto) p.dump(arg) f.seek(0) return f.read() finally: self.close(f)
def dumps(self, arg, proto=0): from zodbpickle import _pickle p = _pickle.Pickler(proto) p.dump(arg) return p.getvalue()