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

Function get_binop_argval

Lib/test/test_peepholer.py:45–49  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

43
44
45def get_binop_argval(arg):
46 for i, nb_op in enumerate(opcode._nb_ops):
47 if arg == nb_op[0]:
48 return i
49 assert False, f"{arg} is not a valid BINARY_OP argument."
50
51
52class TestTranforms(BytecodeTestCase):

Calls 1

enumerateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…