Uranium
Application Framework
 All Classes Namespaces Files Functions Variables Pages
UM.Signal.WeakImmutableList Class Reference

Minimal implementation of a weak reference list with immutable tendencies. More...

Inherits Generic, T, and Iterable.

Public Member Functions

def __init__
 
def append
 Append an item and return a new list. More...
 
def remove
 Remove an item and return a list. More...
 
def __iter__
 

Detailed Description

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.

Member Function Documentation

def UM.Signal.WeakImmutableList.append (   self,
  item 
)

Append an item and return a new list.

Parameters
itemthe item to append
Returns
a new list
def UM.Signal.WeakImmutableList.remove (   self,
  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.

Parameters
itemitem to remove
Returns
a list which does not have the item.

The documentation for this class was generated from the following file: