MCPcopy Index your code
hub / github.com/python/cpython / opcode_in_pickle

Function opcode_in_pickle

Lib/test/pickletester.py:64–68  ·  view source on GitHub ↗
(code, pickle)

Source from the content-addressed store, hash-verified

62
63# Return True if opcode code appears in the pickle, else False.
64def opcode_in_pickle(code, pickle):
65 for op, dummy, dummy in pickletools.genops(pickle):
66 if op.code == code.decode("latin-1"):
67 return True
68 return False
69
70# Return the number of times opcode code appears in pickle.
71def count_opcode(code, pickle):

Callers 11

test_bytearrayMethod · 0.85
test_long1Method · 0.85
test_long4Method · 0.85
test_short_tuplesMethod · 0.85
test_singletonsMethod · 0.85
produce_global_extMethod · 0.85
test_simple_newobjMethod · 0.85
test_complex_newobjMethod · 0.85

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…