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

substr of 1 char length at end of string generates code that gives IndexError #130

Open snoopyjc opened 2 years ago

snoopyjc commented 2 years ago

substr of 1 char length at end of string generates code that gives IndexError. In perl a substr at the end of the string should give the empty string as the result, not an IndexError exception.

snoopyjc commented 2 years ago

Fixed in my v0.961 with an additional fix for ++/-- in substr in v0.966: https://github.com/snoopyjc/pythonizer/