list sub-class which holds weak references to objects


class WeakList( list ):
list sub-class holding weakrefs to items
The weak reference list is intended to allow you to store references to a list of objects without needing to manage weak references directly.
For the most part, the WeakList operates just like a list object, in that it allows for all of the standard list operations. The difference is that the WeakList class only stores weak references to its items. As a result, adding an object to the list does not necessarily mean that it will still be there later on during execution (if the referent has been garbage collected).