Since pretty much the beginning, the GDPyS project has been using the same class for its LRU cache. Now while it fits the purpose well, I was recently informed of a cool object in the collections library called deque. It takes any iterable (which includes dictionaries) and allows you to access them and also set the max size.
Since pretty much the beginning, the GDPyS project has been using the same class for its LRU cache. Now while it fits the purpose well, I was recently informed of a cool object in the
collections
library calleddeque
. It takes any iterable (which includes dictionaries) and allows you to access them and also set the max size.https://docs.python.org/3/library/collections.html#deque-objects