You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
More 3.2 LOAD_CONST removal
More python3 custom grammar DRYing
This commit is contained in:
@@ -1017,6 +1017,12 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
# FIXME: clean this up
|
||||
if self.version > 3.0 and node == 'dictcomp':
|
||||
cn = node[1]
|
||||
elif self.version > 3.0 and node == 'genexpr':
|
||||
if node[0] == 'load_genexpr':
|
||||
load_genexpr = node[0]
|
||||
elif node[1] == 'load_genexpr':
|
||||
load_genexpr = node[1]
|
||||
cn = load_genexpr[0]
|
||||
elif hasattr(node[code_index], 'attr'):
|
||||
# Python 2.5+ (and earlier?) does this
|
||||
cn = node[code_index]
|
||||
|
Reference in New Issue
Block a user