You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
last change left 3.2 finding comp_iter broken
This commit is contained in:
@@ -1052,6 +1052,7 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
ast = ast[0]
|
ast = ast[0]
|
||||||
|
|
||||||
store = None
|
store = None
|
||||||
|
n = ast[iter_index]
|
||||||
if ast in ['set_comp_func', 'dict_comp_func',
|
if ast in ['set_comp_func', 'dict_comp_func',
|
||||||
'list_comp', 'set_comp_func_header']:
|
'list_comp', 'set_comp_func_header']:
|
||||||
for k in ast:
|
for k in ast:
|
||||||
@@ -1063,7 +1064,6 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
n = ast[iter_index]
|
|
||||||
assert n == 'list_iter', n
|
assert n == 'list_iter', n
|
||||||
|
|
||||||
# FIXME: I'm not totally sure this is right.
|
# FIXME: I'm not totally sure this is right.
|
||||||
@@ -1071,10 +1071,8 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
# Find the list comprehension body. It is the inner-most
|
# Find the list comprehension body. It is the inner-most
|
||||||
# node that is not list_.. .
|
# node that is not list_.. .
|
||||||
if_node = None
|
if_node = None
|
||||||
comp_for = None
|
|
||||||
comp_store = None
|
comp_store = None
|
||||||
if n == 'comp_iter':
|
if n == 'comp_iter':
|
||||||
comp_for = n
|
|
||||||
comp_store = ast[3]
|
comp_store = ast[3]
|
||||||
|
|
||||||
have_not = False
|
have_not = False
|
||||||
|
Reference in New Issue
Block a user