We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c15159 commit 91d8601Copy full SHA for 91d8601
tests/main.go
@@ -34,4 +34,16 @@ func main() {
34
fmt.Printf("cPickle.dumps(%s) = %q\n", gostr,
35
python.PyString_AsString(out),
36
)
37
+ loads := pickle.GetAttrString("loads")
38
+ if loads == nil {
39
+ panic("could not retrieve 'cPickle.loads'")
40
+ }
41
+ out2 := loads.CallFunctionObjArgs("O", out)
42
+ if out2 == nil {
43
+ panic("could not load back out")
44
45
+ fmt.Printf("cPickle.loads(%q) = %q\n",
46
+ python.PyString_AsString(out),
47
+ python.PyString_AsString(out2),
48
+ )
49
}
0 commit comments