diff --git a/uncompyle6/scanners/scanner2.py b/uncompyle6/scanners/scanner2.py index 5b79ace2..713d2869 100644 --- a/uncompyle6/scanners/scanner2.py +++ b/uncompyle6/scanners/scanner2.py @@ -131,6 +131,7 @@ class Scanner2(scan.Scanner): replace = {} while i < n-1: if self.lines[last_stmt].next > i: + # Distinguish "print ..." from "print ...," if self.code[last_stmt] == self.opc.PRINT_ITEM: if self.code[i] == self.opc.PRINT_ITEM: replace[i] = 'PRINT_ITEM_CONT' diff --git a/uncompyle6/scanners/scanner26.py b/uncompyle6/scanners/scanner26.py index 4e52369b..8aff436c 100755 --- a/uncompyle6/scanners/scanner26.py +++ b/uncompyle6/scanners/scanner26.py @@ -153,6 +153,7 @@ class Scanner26(scan.Scanner2): replace = {} while i < codelen - 1: if self.lines[last_stmt].next > i: + # Distinguish "print ..." from "print ...," if self.code[last_stmt] == self.opc.PRINT_ITEM: if self.code[i] == self.opc.PRINT_ITEM: replace[i] = 'PRINT_ITEM_CONT' diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index 1ac045f4..56640695 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -262,7 +262,7 @@ TABLE_DIRECT = { 'assert_expr_or': ( '%c or %c', 0, 2 ), 'assert_expr_and': ( '%c and %c', 0, 2 ), - 'print_items_stmt': ( '%|print %c%c,\n', 0, 2), + 'print_items_stmt': ( '%|print %c%c,\n', 0, 2), # Python 2 only 'print_items_nl_stmt': ( '%|print %c%c\n', 0, 2), 'print_item': ( ', %c', 0), 'print_nl': ( '%|print\n', ),