diff --git a/uncompyle6/parsers/parse3.py b/uncompyle6/parsers/parse3.py index 58814d22..08838e90 100644 --- a/uncompyle6/parsers/parse3.py +++ b/uncompyle6/parsers/parse3.py @@ -344,6 +344,10 @@ class Python3Parser(PythonParser): ''' expr ::= LOAD_CLASSNAME expr ::= LOAD_ASSERT + + # Python 3.4+ + expr ::= LOAD_CLASSDEREF + # Python3 drops slice0..slice3 # Python 3.3+ adds yield from diff --git a/uncompyle6/scanners/scanner2.py b/uncompyle6/scanners/scanner2.py index f3e9b704..51c41ed4 100755 --- a/uncompyle6/scanners/scanner2.py +++ b/uncompyle6/scanners/scanner2.py @@ -50,7 +50,8 @@ class Scanner2(scan.Scanner): """ show_asm = self.show_asm if not show_asm else show_asm - if self.show_asm in ('both', 'before'): + # show_asm = 'before' + if show_asm in ('both', 'before'): from xdis.bytecode import Bytecode bytecode = Bytecode(co, self.opc) for instr in bytecode.get_instructions(co): diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index 5beafbcd..dd5eb437 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -344,6 +344,10 @@ TABLE_DIRECT = { 'kv2': ( '%c: %c', 1, 2 ), 'mapexpr': ( '{%[1]C}', (0, maxint, ', ') ), + # CE - Fixes for tuples + 'assign2': ( '%|%c, %c = %c, %c\n', 3, 4, 0, 1 ), + 'assign3': ( '%|%c, %c, %c = %c, %c, %c\n', 5, 6, 7, 0, 1, 2 ), + ####################### # Python 2.3 Additions ####################### @@ -365,9 +369,10 @@ TABLE_DIRECT = { 'importmultiple': ( '%|import %c%c\n', 2, 3 ), 'import_cont' : ( ', %c', 2 ), - # CE - Fixes for tuples - 'assign2': ( '%|%c, %c = %c, %c\n', 3, 4, 0, 1 ), - 'assign3': ( '%|%c, %c, %c = %c, %c, %c\n', 5, 6, 7, 0, 1, 2 ), + ######################## + # Python 3.4+ Additions + ####################### + 'LOAD_CLASSDEREF': ( '%{pattr}', ), }