kopia lustrzana https://github.com/micropython/micropython-lib
pickle: Module produces and consumes bytes.
So, dumps() should return bytes, dump() should be passed binary file, etc.pull/255/head
rodzic
66f147a761
commit
22527a6ebd
|
@ -4,7 +4,7 @@ def dump(obj, f, proto=0):
|
|||
f.write(repr(obj))
|
||||
|
||||
def dumps(obj, proto=0):
|
||||
return repr(obj)
|
||||
return repr(obj).encode()
|
||||
|
||||
def load(f):
|
||||
s = f.read()
|
||||
|
@ -12,6 +12,7 @@ def load(f):
|
|||
|
||||
def loads(s):
|
||||
d = {}
|
||||
s = s.decode()
|
||||
if "(" in s:
|
||||
qualname = s.split("(", 1)[0]
|
||||
if "." in qualname:
|
||||
|
|
Ładowanie…
Reference in New Issue