You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
Reinstate except_cond{2,3} rules
This commit is contained in:
@@ -409,7 +409,9 @@ TABLE_DIRECT = {
|
||||
'tf_tryelsestmt': ( '%c%-%c%|else:\n%+%c', 1, 3, 4 ),
|
||||
'tryfinallystmt': ( '%|try:\n%+%c%-%|finally:\n%+%c%-\n\n', 1, 5 ),
|
||||
'except': ( '%|except:\n%+%c%-', 3 ),
|
||||
'except_cond1': ( '%|except %c:\n', 1 ),
|
||||
'except_cond1': ( '%|except %c:\n', (1, 'expr') ),
|
||||
'except_cond2': ( '%|except %c as %c:\n',
|
||||
(1, 'expr'), (5, 'store') ),
|
||||
'except_suite': ( '%+%c%-%C', 0, (1, maxint, '') ),
|
||||
|
||||
# In Python 3.6, this is more complicated in the presence of "returns"
|
||||
|
@@ -57,6 +57,10 @@ def customize_for_version(self, is_pypy, version):
|
||||
from uncompyle6.semantics.customize3 import customize_for_version3
|
||||
customize_for_version3(self, version)
|
||||
else: # < 3.0
|
||||
TABLE_DIRECT.update({
|
||||
'except_cond3' : ( '%|except %c, %c:\n',
|
||||
(1, 'expr'), (-2, 'store') )
|
||||
})
|
||||
if 2.4 <= version <= 2.6:
|
||||
TABLE_DIRECT.update({
|
||||
'comp_for': ( ' for %c in %c', 3, 1 ),
|
||||
|
Reference in New Issue
Block a user