previous 2.7 class decorator bug fixed in 3.x

This commit is contained in:
rocky
2016-06-20 20:19:17 -04:00
parent f215888374
commit a6fbe4c636
3 changed files with 12 additions and 6 deletions

View File

@@ -34,6 +34,7 @@ import xdis.opcodes.opcode_33 as op3
globals().update(op3.opmap)
# POP_JUMP_IF is used by verify
POP_JUMP_TF = (POP_JUMP_IF_TRUE, POP_JUMP_IF_FALSE)
import uncompyle6.scanner as scan
@@ -56,7 +57,8 @@ class Scanner3(scan.Scanner):
"""
show_asm = self.show_asm if not show_asm else show_asm
if self.show_asm in ('both', 'before'):
# show_asm = 'both'
if show_asm in ('both', 'before'):
bytecode = Bytecode(co, self.opc)
for instr in bytecode.get_instructions(co):
print(instr._disassemble())