vrml.weaklist
list sub-class which holds weak references to objects
Classes
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).
__init__(
self
,
sequence
= ()
)
Initialize the list, with an optional sequence of objects
The WeakList will store weak references to objects
within the sequence.
sort(
self
,
function
= None
)
Sort the list of objects
This sorts the objects referenced,
then rebuilds the list of references!