You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Modified "load_closure" rule and changed semantic actions since LOAD_CLOSUREs are stored inside a MAKE_TUPLE. FIXME: Not sure if we have additional "if" clauses correct. Test and correct
19 lines
581 B
Python
19 lines
581 B
Python
# From 3.6 _sitebuiltins.py
|
|
# Bug was in handling double nested kinds of things like:
|
|
# for a in b for c in d
|
|
|
|
# This required grammar modification and
|
|
# and semantic action changes. LOAD_CLOSUREs are stored
|
|
# inside a MAKE_TUPLE.
|
|
|
|
# FIXME: test and try additional "if" clauses.
|
|
def __init__(self, path, name, files=(), dirs=(), volumes=()):
|
|
f = [path.join(dir, filename)
|
|
for dir in dirs
|
|
for filename in files]
|
|
f2 = [path.join(drive, dir, filename)
|
|
for dir in dirs
|
|
for filename in files
|
|
for drive in volumes]
|
|
return f, f2
|