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 constant tuples in call
This commit is contained in:
BIN
test/bytecode_3.6/03_build_tuple_call.pyc
Normal file
BIN
test/bytecode_3.6/03_build_tuple_call.pyc
Normal file
Binary file not shown.
4
test/simple_source/bug36/03_build_tuple_call.py
Normal file
4
test/simple_source/bug36/03_build_tuple_call.py
Normal file
@@ -0,0 +1,4 @@
|
||||
# From Python 3.6.5 email/message.py
|
||||
# Bug is in handling 'related' parameter
|
||||
def add_related(self, *args, **kw):
|
||||
self._add_multipart('related', *args, _disp='inline', **kw)
|
@@ -124,8 +124,13 @@ def customize_for_version36(self, version):
|
||||
tup = btuwc[0]
|
||||
if tup == 'expr':
|
||||
tup = tup[0]
|
||||
assert tup == 'tuple'
|
||||
self.call36_tuple(tup)
|
||||
|
||||
if tup == 'LOAD_CONST':
|
||||
self.write(', '.join(['"%s"' % t.replace('"','\\"') for t in tup.attr]))
|
||||
else:
|
||||
assert tup == 'tuple'
|
||||
self.call36_tuple(tup)
|
||||
|
||||
assert node[2] == 'build_map_unpack_with_call'
|
||||
|
||||
self.write(', ')
|
||||
|
Reference in New Issue
Block a user