rocky / python-uncompyle6

A cross-version Python bytecode decompiler
GNU General Public License v3.0
3.74k stars 408 forks source link

Strange string decompilation for tuples in Python 2.7.18 #450

Closed andrem-eberle closed 1 year ago

andrem-eberle commented 1 year ago

Description

String being rendered as characters inside tuples

How to Reproduce

Input file:

a = b"\xde\xad"
a,b = (b'a', b"\xde\xad")

Output:

a = '\xde\xad'
a, b = ('a', 'ޭ')

It works well for the outer string, but prints weird characters inside the tuple.

uncompyle6 using python 3.8.16

andrem-eberle commented 1 year ago

Sorry, I misinterpreted this, the error happens outside the tuple also, so it is not related.

andrem-eberle commented 1 year ago

This is not a bug.