Issue #26647: Cleanup opcode

Simplify code to build opcode.opname. Patch written by Demur Rumed.
This commit is contained in:
Victor Stinner 2016-04-12 18:15:26 +02:00
parent 2cfa4c7b27
commit 7b228231c7
1 changed files with 1 additions and 3 deletions

View File

@ -34,9 +34,7 @@ hasfree = []
hasnargs = []
opmap = {}
opname = [''] * 256
for op in range(256): opname[op] = '<%r>' % (op,)
del op
opname = ['<%r>' % (op,) for op in range(256)]
def def_op(name, op):
opname[op] = name