TIL #145 – collections.deque is implemented in blocks

Today I learned that collections.deque is implemented as a doubly-linked list of blocks. collections.deque I've written about the data structure deque from the module collections extensively. In particular, I wrote a deque tutorial with plenty of practical example use cases of deque . Today, after some discussion during a cohort I was teaching, a student sent a link to the collections.deque source…