Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes Class Reference
Inheritance diagram for
Inheritance graph
Collaboration diagram for
Collaboration graph

List of all members.

Public Member Functions

def __init__
def __repr__
def calls_update

Public Attributes


Static Public Attributes

tuple clear = calls_update('clear')
tuple pop = calls_update('pop')
tuple popitem = calls_update('popitem')
tuple setdefault = calls_update('setdefault')
tuple update = calls_update('update')

Detailed Description

A dict that calls a function passed every time something is changed.
The function is passed the dict instance.

Definition at line 1485 of file

Constructor & Destructor Documentation

def (   self,
  initial = None,
  on_update = None 

Definition at line 1490 of file

01491     def __init__(self, initial=None, on_update=None):
01492         dict.__init__(self, initial or ())
01493         self.on_update = on_update

Member Function Documentation

Definition at line 1494 of file

01495     def __repr__(self):
01496         return '<%s %s>' % (
01497             self.__class__.__name__,
01498             dict.__repr__(self)
01499         )

Definition at line 135 of file

00136     def calls_update(name):
00137         def oncall(self, *args, **kw):
00138             rv = getattr(super(UpdateDictMixin, self), name)(*args, **kw)
00139             if self.on_update is not None:
00140                 self.on_update(self)
00141             return rv
00142         oncall.__name__ = name
00143         return oncall

Member Data Documentation

Definition at line 146 of file

Reimplemented from

Definition at line 1492 of file

Definition at line 147 of file

Definition at line 148 of file

Definition at line 149 of file

Definition at line 150 of file

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