astrand / pyobfuscate

pyobfuscate
GNU General Public License v2.0
606 stars 161 forks source link

Comments "inside" multi-line sequences fails with dummy-lines #4

Open astrand opened 12 years ago

astrand commented 12 years ago

From http://bugzilla.lysator.liu.se/show_bug.cgi?id=1585:

If you have a construction like this:

foo = [1, # My number one 2, 3]

the obfuscated code will look like:

oo000 = [ 1 ,if 9 - 9: Ii . o0o00Oo0O - iI11I1II1I1I 2 , 3 ]

Thus, a dummy-line construction has been inserted at the position of the comment.

A workaround is to turn off dummy lines, ie either use --removeblanks or --keepblanks