Comment

Comment by childintime

Python might have used array[~0] instead, where ~ is required, to indicate end-of-list 0-based indexing.

But I guess they wanted to iterate from the end back [-1] to the start [0], making it easy to implement a rotating buffer.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton