You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Python 2.4 unpack rule needs adjusting for exceptions
This commit is contained in:
@@ -1827,9 +1827,15 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
self.write(', ')
|
||||
self.prune()
|
||||
return
|
||||
|
||||
for n in node[1:]:
|
||||
if n[0].kind == 'unpack':
|
||||
n[0].kind = 'unpack_w_parens'
|
||||
|
||||
# In Python 2.4, unpack is used in (a, b, c) of:
|
||||
# except RuntimeError, (a, b, c):
|
||||
if self.version < 2.7:
|
||||
node.kind = 'unpack_w_parens'
|
||||
self.default(node)
|
||||
|
||||
n_unpack_w_parens = n_unpack
|
||||
|
Reference in New Issue
Block a user