I'm speaking of the case > number string and < number string.
It works as expected, if the length of the string is bigger than the number. E.g. >3G gives xyz, the last 3 chars. But whenever this is not the case, than weird effects are happening. E.g. >4"xyz gives z. The last four chars of "xyz" are "z".
The reason is, that the implementation of >AB translates to B[len(B)-A:], so in the example case "xyz"[-1:]. Everything up from the last element.
I guess we should fix this. It bugged me today (could have saved the two reverse operations), and I think it bugged me previously (few months before).
I'm speaking of the case
> number string
and< number string
.It works as expected, if the length of the string is bigger than the number. E.g.
>3G
givesxyz
, the last 3 chars. But whenever this is not the case, than weird effects are happening. E.g.>4"xyz
givesz
. The last four chars of"xyz"
are"z"
.The reason is, that the implementation of
>AB
translates toB[len(B)-A:]
, so in the example case"xyz"[-1:]
. Everything up from the last element.I guess we should fix this. It bugged me today (could have saved the two reverse operations), and I think it bugged me previously (few months before).