Invalid syntax error during compile of bytes sequence

544 views Asked by At

I've come across some old Python code (Python bytecode 2.5) that I've decompiled with uncompyle6. I've made no changes to the uncompiled code. I went to compile the code again in it's Python 2.5 environment I get this.

String = b'\xb8\xcd\xc2\x93\x8e\x8e\x94'
                                       ^
SyntaxError: invalid syntax

I'm new to Python and wanted to have a look at the code. Any ideas?

1

There are 1 answers

0
rikyeah On

b prefix is absent in Python 2.5 and older (it is equivalent to a plain string of 2.x, while plain string of 3.x is equivalent to a literal with u prefix in 2.x).