get_next, get_prev, in Python OrderedDict Aug 2018

I provide an example class based on an OrderedDict — with an adjunct dictionary to index to the next and prev OrderedDict entry. In my case, I have a rather static OrderedDict: it is a dictionary of AISC shape objects. The function set_prev_next() must be called after each operation that modifies OrderedDict. class MyClass(coll.OrderedDict): mynpdict […]