pythonizer icon indicating copy to clipboard operation
pythonizer copied to clipboard

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

Open snoopyjc opened this issue 3 years ago • 1 comments

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 avatar Mar 07 '22 14:03 snoopyjc

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

snoopyjc avatar Mar 31 '22 22:03 snoopyjc