You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Fix 3.6. call_ex_kw semantic action
Was missing positional args parameter in template. Fix submited by @x0ret Fixes #227
This commit is contained in:
BIN
test/bytecode_3.6_run/02_call_ex_kw.pyc
Normal file
BIN
test/bytecode_3.6_run/02_call_ex_kw.pyc
Normal file
Binary file not shown.
13
test/simple_source/bug36/02_call_ex_kw.py
Normal file
13
test/simple_source/bug36/02_call_ex_kw.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# From #227
|
||||
# Bug was not handling call_ex_kw correctly
|
||||
# THis appears in
|
||||
# showparams(c, test="A", **extra_args)
|
||||
# below
|
||||
|
||||
def showparams(c, test, **extra_args):
|
||||
return {'c': c, **extra_args, 'test': test}
|
||||
|
||||
def f(c, **extra_args):
|
||||
return showparams(c, test="A", **extra_args)
|
||||
|
||||
assert f(1, a=2, b=3) == {'c': 1, 'a': 2, 'b': 3, 'test': 'A'}
|
@@ -69,8 +69,9 @@ def customize_for_version36(self, version):
|
||||
'%c(%p)',
|
||||
(0, 'expr'), (1, 100)),
|
||||
'call_ex_kw' : (
|
||||
'%c(%p)',
|
||||
(0, 'expr'), (2, 100)),
|
||||
'%c(*%c, %p)',
|
||||
(0, 'expr'), (1, 'expr'),
|
||||
(2, 'build_map_unpack_with_call', 100)),
|
||||
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user