softpano / pythonizer

Translator (or more correctly transcriber) from Perl to Python
http://www.softpanorama.org/Scripting/Pythonorama/Python_for_perl_programmers/Pythonizer/index.shtml
Other
39 stars 17 forks source link

++ and -- generate bad code inside an expression #74

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

++ and -- generate bad code inside an expression. For example (from the perl test suite):

tryeq $T++,  13 %  4, 1, 'modulo: positive positive';

generates this python code, which is a syntax error:

tryeq([T+=1,13%4,1,'modulo: positive positive'])
snoopyjc commented 2 years ago

Fixed in https://github.com/snoopyjc/pythonizer