Reverse string slice goes into infinite loop fix
I bumped into #455 in my own code, but a little investigation showed that a small patch to transcrypt/modules/org/transcrypt/__builtin__.js (viewable as the totality of PR #702) would fix it. I don't think the patch is outsized for the increase in functionality - negative steps in slices are fairly fundamental. I also don't understand why #455 was marked 'IS:limitation'.
Thanks for the fix. I think this should be in the next major version. Still want to take a good long look at it. And indeed at least there should be a decent error report.
Will be fixed in v3.9.4
This fix (currently on dev_3.9.4 branch) required a bit more extra logic to cover edge cases, but I feel slicing is a foundational feature of Python and the extra code in the runtime is worth being able to move the behavior closer to that of CPython. I also added validations for invalid slices similar to CPython. The updated code shouldn't slow down slicing much for the more common step==1 use cases.