Skip to content

Commit f0d2056

Browse files
committed
Clean up dis.py a bit
1 parent 51c4b5f commit f0d2056

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Lib/dis.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
MAKE_FUNCTION_FLAGS = ('defaults', 'kwdefaults', 'annotations', 'closure')
2929

3030
LOAD_CONST = opmap['LOAD_CONST']
31-
3231
BINARY_OP = opmap['BINARY_OP']
33-
BINARY_OPS = [name for _, name in _nb_ops]
34-
35-
del _nb_ops
3632

3733
def _try_compile(source, name):
3834
"""Attempts to compile the given source, first as an expression and
@@ -453,7 +449,7 @@ def _get_instructions_bytes(code, varname_from_oparg=None,
453449
argrepr = ', '.join(s for i, s in enumerate(MAKE_FUNCTION_FLAGS)
454450
if arg & (1<<i))
455451
elif op == BINARY_OP:
456-
argrepr = BINARY_OPS[arg]
452+
_, argrepr = _nb_ops[arg]
457453
yield Instruction(opname[op], op,
458454
arg, argval, argrepr,
459455
offset, starts_line, is_jump_target, positions)

0 commit comments

Comments
 (0)