MCPcopy Index your code
hub / github.com/RustPython/RustPython / count_opcode

Function count_opcode

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

Source from the content-addressed store, hash-verified

64
65# Return the number of times opcode code appears in pickle.
66def count_opcode(code, pickle):
67 n = 0
68 for op, dummy, dummy in pickletools.genops(pickle):
69 if op.code == code.decode("latin-1"):
70 n += 1
71 return n
72
73
74def identity(x):

Callers 9

test_protoMethod · 0.85
test_list_chunkingMethod · 0.85
test_dict_chunkingMethod · 0.85
test_set_chunkingMethod · 0.85
test_optional_framesMethod · 0.85
test_in_band_buffersMethod · 0.85
test_oob_buffersMethod · 0.85

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected