synchronized lists

Andreas Kremer andreas3004 at hotmail.com
Fri Jul 20 03:22:52 EDT 2001


Hi,

i have the following design problem:

in different classes i have lists which consist of elements pointing to
instances of other classes with lists. What i need to acchieve is that if an
instance of one class is pointing towards another instance, the latter needs
a pointer to the former in its list, too, to know who is pointing at it. The
result would be at least two lists in each instance, one with pointers
outwards to other instances, the other with pointer to instances which point
to this instance.

I was thinking about a superclass of  synchronized lists, but that design
did not look "nice". Also a connector doesnt seem to be the best idea. Has
anybody an idea about how to acchieve this goal?

Thanks in advance, Andreas.





More information about the Python-list mailing list