Package horizons :: Package util :: Package python :: Module weakmethodlist :: Class WeakMethodList
[hide private]
[frames] | no frames]

Class WeakMethodList

source code

object --+    
         |    
      list --+
             |
            WeakMethodList

A class that handles zero to n callbacks.

Instance Methods [hide private]
new empty list
__init__(self, callbacks=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
append(self, callback)
Just like list.append, except it can also handle lists and discards None-values
source code
 
extend(self, callback)
Just like list.append, except it can also handle lists and discards None-values
source code
 
execute(self)
Execute all callbacks.
source code
 
remove(self, elem)
remove first occurrence of value.
source code
 
__contains__(self, elem)
y in x
source code
 
__str__(self)
str(x)
source code

Inherited from list: __add__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, count, index, insert, pop, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from list: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, callbacks=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • callbacks - None, a function, a list of functions, or a tuple of functions
Returns: new empty list
Overrides: object.__init__

append(self, callback)

source code 

Just like list.append, except it can also handle lists and discards None-values

Overrides: list.append

extend(self, callback)

source code 

Just like list.append, except it can also handle lists and discards None-values

Overrides: list.extend

execute(self)

source code 

Execute all callbacks. Number of callbacks may be zero to n.

remove(self, elem)

source code 

remove first occurrence of value. Raises ValueError if the value is not present.

Overrides: list.remove
(inherited documentation)

__contains__(self, elem)
(In operator)

source code 

y in x

Overrides: list.__contains__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)