Reciprocal data structures

pavlovevidence at gmail.com pavlovevidence at gmail.com
Sun Jun 18 15:27:52 EDT 2017


I'm not sure if "reciprocal" is the right word, or if there is an official term for this.

I am thinking of a list that actively maintains in its items a member that contains the item's own index in the list.  Basically, the item knows its index into the list and the list ensures that the index remains in sync.  If the list is changed, the list updates the indices.  This is a the that might be useful in implementing observer pattern.



I guess I am questioning if there's a well-known package that does anything like this?  I don't know what the official computer science term might be for this so I'm having trouble googling for it.  I don't need this kind of thing a lot, but to me it has the feel of something that should be already available somewhere.


Carl Banks



More information about the Python-list mailing list