Inherits Generic, T, and Iterable.
|
None | __init__ (self) |
|
"WeakImmutableList[T]" | append (self, T item) |
|
"WeakImmutableList[T]" | remove (self, T item) |
|
| __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.
◆ append()
"WeakImmutableList[T]" UM.Signal.WeakImmutableList.append |
( |
| self, |
|
|
T | item ) |
Append an item and return a new list
:param item: the item to append
:return: a new list
◆ remove()
"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.
:param item: item to remove
:return: a list which does not have the item.
The documentation for this class was generated from the following file: