diff --git a/test/bytecode_3.6/03_build_tuple_call.pyc b/test/bytecode_3.6/03_build_tuple_call.pyc new file mode 100644 index 00000000..66533213 Binary files /dev/null and b/test/bytecode_3.6/03_build_tuple_call.pyc differ diff --git a/test/simple_source/bug36/03_build_tuple_call.py b/test/simple_source/bug36/03_build_tuple_call.py new file mode 100644 index 00000000..3ceb990c --- /dev/null +++ b/test/simple_source/bug36/03_build_tuple_call.py @@ -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) diff --git a/uncompyle6/semantics/customize36.py b/uncompyle6/semantics/customize36.py index 6c2a547b..5b283ad1 100644 --- a/uncompyle6/semantics/customize36.py +++ b/uncompyle6/semantics/customize36.py @@ -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(', ')