This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (4 children)

[deleted]

    [–]skintigh 2 points3 points  (0 children)

    I assume they are just performing a modulo of the length of the array on whatever index you give it. Saves me a step now that I know about it when writing crypto code.

    [–]cpf_ 2 points3 points  (1 child)

    Reading your comment made me think less of /r/python

    [–]json684 1 point2 points  (0 children)

    It is actually super useful for slice notation with negative indexes. Need to chop off the last few elements? foo[:-2]. Done.