diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-04-12 16:15:26 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-04-12 16:15:26 (GMT) |
commit | 7b228231c78f49986928cd587cbf85197a3b3987 (patch) | |
tree | 9d47d5cf5adf0e2b63390c2f4b84bf247afae60c /Lib/opcode.py | |
parent | 2cfa4c7b27c1d860b5c743fc65322d62ac07d2d3 (diff) | |
download | cpython-7b228231c78f49986928cd587cbf85197a3b3987.zip cpython-7b228231c78f49986928cd587cbf85197a3b3987.tar.gz cpython-7b228231c78f49986928cd587cbf85197a3b3987.tar.bz2 |
Issue #26647: Cleanup opcode
Simplify code to build opcode.opname. Patch written by Demur Rumed.
Diffstat (limited to 'Lib/opcode.py')
-rw-r--r-- | Lib/opcode.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py index 71ce672..ecc24bb 100644 --- a/Lib/opcode.py +++ b/Lib/opcode.py @@ -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 |