You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
3.6 keyword args bugs in CALL_FUNCTION_KW
This commit is contained in:
BIN
test/bytecode_3.6/05_call_function_kw2.pyc
Normal file
BIN
test/bytecode_3.6/05_call_function_kw2.pyc
Normal file
Binary file not shown.
4
test/simple_source/bug36/05_call_function_kw2.py
Normal file
4
test/simple_source/bug36/05_call_function_kw2.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# From 3.6 _pydecimal. Bug was handling
|
||||
# keyword args in the return (CALL_FUNCTION_KW_2)
|
||||
def to_eng_string(self, context=None):
|
||||
return self.__str__(eng=True, context=context)
|
@@ -575,7 +575,8 @@ def customize_for_version(self, is_pypy, version):
|
||||
num_kwargs = len(keys)
|
||||
num_posargs = len(node) - (num_kwargs + 1)
|
||||
n = len(node)
|
||||
assert n >= len(keys)+2
|
||||
assert n >= len(keys)+1, \
|
||||
'not enough parameters keyword-tuple values'
|
||||
sep = ''
|
||||
# FIXME: adjust output for line breaks?
|
||||
for i in range(num_posargs):
|
||||
@@ -590,6 +591,7 @@ def customize_for_version(self, is_pypy, version):
|
||||
self.write(sep)
|
||||
self.write(keys[j] + '=')
|
||||
self.preorder(node[i])
|
||||
sep=', '
|
||||
i += 1
|
||||
j += 1
|
||||
self.write(')')
|
||||
|
Reference in New Issue
Block a user