You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Accomodate for optional docstring in function kw calculation
This commit is contained in:
@@ -848,10 +848,18 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
|
||||
|
||||
free_tup = ann_dict = kw_dict = default_tup = None
|
||||
fn_bits = node[-1].attr
|
||||
index = -4 # Skip over:
|
||||
|
||||
# Skip over:
|
||||
# MAKE_FUNCTION,
|
||||
# optional docstring
|
||||
# LOAD_CONST qualified name,
|
||||
# LOAD_CONST code object
|
||||
index = -4 # Skip over:
|
||||
if node[-2] == "docstring":
|
||||
index = -5
|
||||
else:
|
||||
index = -4
|
||||
|
||||
if fn_bits[-1]:
|
||||
free_tup = node[index]
|
||||
index -= 1
|
||||
|
Reference in New Issue
Block a user