You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Had botched parameter order in 3.x. Sigh
This commit is contained in:
@@ -591,9 +591,8 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
|
||||
paramnames = list(scanner_code.co_varnames[:argc])
|
||||
|
||||
# defaults are for last n parameters, thus reverse
|
||||
if self.version < 3.6:
|
||||
paramnames.reverse();
|
||||
defparams.reverse()
|
||||
paramnames.reverse();
|
||||
defparams.reverse()
|
||||
|
||||
try:
|
||||
ast = self.build_ast(scanner_code._tokens,
|
||||
@@ -622,8 +621,7 @@ def make_function3(self, node, is_lambda, nested=1, code_node=None):
|
||||
else:
|
||||
params = paramnames
|
||||
|
||||
if not 3.1 <= self.version < 3.6:
|
||||
params.reverse() # back to correct order
|
||||
params.reverse() # back to correct order
|
||||
|
||||
if code_has_star_arg(code):
|
||||
if self.version > 3.0:
|
||||
|
Reference in New Issue
Block a user