Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ dump_then_load
Method
dump_then_load
extra_tests/snippets/stdlib_marshal.py:10–11 ·
view source on GitHub ↗
(self, data)
Source
from the content-addressed store, hash-verified
8
""
"
9
10
def
dump_then_load(self, data):
11
return
marshal.loads(marshal.dumps(data))
12
13
def
_test_marshal(self, data):
14
self.assertEqual(self.dump_then_load(data), data)
Callers
2
_test_marshal
Method · 0.95
test_marshal_bytearray
Method · 0.95
Calls
2
loads
Method · 0.45
dumps
Method · 0.45
Tested by
1
test_marshal_bytearray
Method · 0.76