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

Function count_opcode

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

Source from the content-addressed store, hash-verified

69
70# Return the number of times opcode code appears in pickle.
71def count_opcode(code, pickle):
72 n = 0
73 for op, dummy, dummy in pickletools.genops(pickle):
74 if op.code == code.decode("latin-1"):
75 n += 1
76 return n
77
78
79def 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…