A listin Python is now implemented as a dynamic array of pointers, so it is not suitable for insertion and deletion at the front end. However, the ring buffer also supports O (1) indexing. It can also expand and contract as a dynamic array to support O (1) cushioned insertion and deletion from both ends. Why didn’t CPython choose this implementation or the main disadvantage of this?
source
share