Uranium
Application Framework
|
Minimal implementation of a weak reference list with immutable tendencies. More...
Inherits Generic, T, and Iterable.
Public Member Functions | |
def | __init__ (self) |
"WeakImmutableList[T]" | append (self, T item) |
Append an item and return a new list. More... | |
"WeakImmutableList[T]" | remove (self, T item) |
Remove an item and return a list. More... | |
def | __iter__ (self) |
Minimal implementation of a weak reference list with immutable tendencies.
Strictly speaking this isn't immutable because the garbage collector can modify it, but no application code can. Also, this class doesn't implement the Python list API, only the handful of methods we actually need in the code above.
"WeakImmutableList[T]" UM.Signal.WeakImmutableList.append | ( | self, | |
T | item | ||
) |
Append an item and return a new list.
item | the item to append |
"WeakImmutableList[T]" UM.Signal.WeakImmutableList.remove | ( | self, | |
T | item | ||
) |
Remove an item and return a list.
Note that unlike the normal Python list.remove() method, this ones doesn't throw a ValueError if the item isn't in the list.
item | item to remove |