Issue #26647: Cleanup opcode
Simplify code to build opcode.opname. Patch written by Demur Rumed.
This commit is contained in:
parent
2cfa4c7b27
commit
7b228231c7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue