Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
38
class
Data(Subject):
Callers
5
__setattr__
Method · 0.95
code_exec
Method · 0.45
Wrapper
Method · 0.45
get
Method · 0.45
put
Method · 0.45
Calls
1
update
Method · 0.45
Tested by
no test coverage detected