Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Static Public Attributes
MoinMoin.support.werkzeug.datastructures.CallbackDict Class Reference
Inheritance diagram for MoinMoin.support.werkzeug.datastructures.CallbackDict:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.support.werkzeug.datastructures.CallbackDict:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__
def calls_update

Public Attributes

 on_update

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 datastructures.py.


Constructor & Destructor Documentation

def MoinMoin.support.werkzeug.datastructures.CallbackDict.__init__ (   self,
  initial = None,
  on_update = None 
)

Definition at line 1490 of file datastructures.py.

01490 
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 datastructures.py.

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

Definition at line 135 of file datastructures.py.

00135 
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 datastructures.py.

Reimplemented from MoinMoin.support.werkzeug.datastructures.UpdateDictMixin.

Definition at line 1492 of file datastructures.py.

Definition at line 147 of file datastructures.py.

Definition at line 148 of file datastructures.py.

Definition at line 149 of file datastructures.py.

Definition at line 150 of file datastructures.py.


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