You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Towards Python3 getting try/except working more often.
This commit is contained in:
@@ -317,6 +317,8 @@ TABLE_DIRECT = {
|
||||
'tryelsestmtl': ( '%|try:\n%+%c%-%c%|else:\n%+%c%-', 1, 3, 4 ),
|
||||
'tf_trystmt': ( '%c%-%c%+', 1, 3 ),
|
||||
'tf_tryelsestmt': ( '%c%-%c%|else:\n%+%c', 1, 3, 4 ),
|
||||
'except': ('%|except:\n%+%c%-', 3 ),
|
||||
'except_pop_except': ('%|except:\n%+%c%-', 4 ),
|
||||
'except_cond1': ( '%|except %c:\n', 1 ),
|
||||
'except_cond2': ( '%|except %c as %c:\n', 1, 5 ),
|
||||
'except_suite': ( '%+%c%-%C', 0, (1, maxint, '') ),
|
||||
@@ -503,12 +505,6 @@ class Walker(GenericASTTraversal, object):
|
||||
self.pending_newlines = 0
|
||||
self.hide_internal = True
|
||||
|
||||
if version >= 3.0:
|
||||
# Python 3 adds a POP_EXCEPT instruction
|
||||
TABLE_DIRECT['except'] = ('%|except:\n%+%c%-', 4 )
|
||||
else:
|
||||
TABLE_DIRECT['except'] = ('%|except:\n%+%c%-', 3 )
|
||||
pass
|
||||
return
|
||||
|
||||
f = property(lambda s: s.params['f'],
|
||||
@@ -1251,7 +1247,6 @@ class Walker(GenericASTTraversal, object):
|
||||
# self.print_("-----")
|
||||
# self.print(startnode)
|
||||
|
||||
|
||||
fmt = entry[0]
|
||||
arg = 1
|
||||
i = 0
|
||||
|
Reference in New Issue
Block a user