forgi.utilities.observedDict module¶
-
class
forgi.utilities.observedDict.
observedDict
(value=[], on_change=<function <lambda>>)[source]¶ Bases:
future.types.newdict.newdict
A dictionary superclass.
A simplified (and less powerful) version of http://code.activestate.com/recipes/306864-list-and-dictionary-observer/, which is written by Bernhard Mulder and licensed under the PSF license.
Whenever a value changes, is added to or deleted from the dictionary, the function on_change will be called with the key as sole argument.