pycdc icon indicating copy to clipboard operation
pycdc copied to clipboard

[bug] decode kwargs

Open krypton-byte opened this issue 3 years ago • 0 comments

~/test >> cat unit.py
def anu(d, **s):
	print(d, s)


anu(1, title='sip', style='bold')
~/test >> python3 unit.py
1 {'title': 'sip', 'style': 'bold'}
~/test >> python3 unit.pyc
1 {'title': 'sip', 'style': 'bold'}
~/test >> pycdc unit.pyc
# Source Generated with Decompyle++
# File: unit.pyc (Python 3.10)


def anu(d, **s):
    print(d, s)

anu(1, 'sip', 'bold', **('title', 'style'))
~/test >> pycdc unit.pyc > dec.py
~/test >> python3 dec.py
Traceback (most recent call last):
  File "/home/krypton-byte/test/dec.py", line 8, in <module>
    anu(1, 'sip', 'bold', **('title', 'style'))
TypeError: __main__.anu() argument after ** must be a mapping, not tuple
~/test >>

krypton-byte avatar Jun 26 '22 06:06 krypton-byte