Was dropping docstrings! Add in decompyle make_function36

This commit is contained in:
rocky
2019-12-27 11:41:03 -05:00
parent 97e3a7eb02
commit 37301ab49e
7 changed files with 505 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
import sys
from xdis.code import iscode
from uncompyle6.parsers.treenode import SyntaxTree
from uncompyle6 import PYTHON3
@@ -173,6 +174,15 @@ def print_docstring(self, indent, docstring):
self.println(lines[-1], quote)
return True
def find_code_node(node, start):
for i in range(-start, len(node) + 1):
if node[-i].kind == "LOAD_CODE":
code_node = node[-i]
assert iscode(code_node.attr)
return code_node
pass
assert False, "did not find code node starting at %d in %s" % (start, node)
def flatten_list(node):
"""