Basically I want to understand how this thing works under the hood. I tried to create a list of tuples [(), (), ...] and each tuple will have two values, qst wuld be the key and second would be the value. but this is not a actual dictionary and also there is performance issue as well (I mean read/write/delete operations.
So How should I write a class
MyOrderedDict which will (probably) be extending the default
any hint or resource would be appreciated.
PS: similar functional we have in Django.
from django.utils.datastructures import SortedDict
are they both same or follow same approach in implementation?
Help on class SortedDict in module django.utils.datastructures:
| A dictionary that keeps its keys in the order in which they're inserted.
| Method resolution order:
| Methods defined here: