You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Small changes
This commit is contained in:
@@ -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'
|
||||
|
@@ -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'
|
||||
|
@@ -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', ),
|
||||
|
Reference in New Issue
Block a user