MCPcopy Create free account
hub / github.com/ActiveState/code / notify

Method notify

recipes/Python/578484_Observer_Pattern/recipe-578484.py:33–35  ·  view source on GitHub ↗
(self, attrname, value)

Source from the content-addressed store, hash-verified

31 pass
32
33 def notify(self, attrname, value):
34 for observer in self._observers:
35 observer.update(self, attrname, value)
36
37# Example usage
38class Data(Subject):

Callers 5

__setattr__Method · 0.95
code_execMethod · 0.45
WrapperMethod · 0.45
getMethod · 0.45
putMethod · 0.45

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected