Package flumotion :: Package common :: Module watched :: Class WatchedDict
[hide private]

Class WatchedDict

source code

object --+    
         |    
      dict --+
             |
            WatchedDict

Instance Methods [hide private]
new empty dictionary

__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__setitem__(self, key, val)
x[i]=y
source code
 
__delitem__(self, key)
del x[y]
source code
v, remove specified key and return the corresponding value
pop(self, key, *args)
If key is not found, d is returned if given, otherwise KeyError is raised
source code
(k, v), remove and return some (key, value) pair as a
popitem(self)
2-tuple; but raise KeyError if D is empty.
source code
None
update(self, *args, **kwargs)
Update D from dict/iterable E and F.
source code
 
notify_changed(self, obj) source code
 
watch(self, proc) source code
 
unwatch(self, proc_id) source code

Inherited from dict: __cmp__, __contains__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __iter__, __le__, __len__, __lt__, __ne__, __new__, __repr__, __sizeof__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, setdefault, values, viewitems, viewkeys, viewvalues

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

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

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

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__setitem__(self, key, val)
(Index assignment operator)

source code 

x[i]=y

Overrides: dict.__setitem__
(inherited documentation)

__delitem__(self, key)
(Index deletion operator)

source code 

del x[y]

Overrides: dict.__delitem__
(inherited documentation)

pop(self, key, *args)

source code 

If key is not found, d is returned if given, otherwise KeyError is raised

Returns: v, remove specified key and return the corresponding value
Overrides: dict.pop
(inherited documentation)

popitem(self)

source code 

2-tuple; but raise KeyError if D is empty.

Returns: (k, v), remove and return some (key, value) pair as a
Overrides: dict.popitem
(inherited documentation)

update(self, *args, **kwargs)

source code 

Update D from dict/iterable E and F. If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

Returns: None
Overrides: dict.update
(inherited documentation)