Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ Data
Class
Data
recipes/Python/578484_Observer_Pattern/recipe-578484.py:38–41 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
36
37
# Example usage
38
class
Data(Subject):
39
def
__init__(self, excluded=[]):
40
# pass up the attrs to be excluded from notification
41
Subject.__init__(self, excluded)
42
43
class
Observer1:
44
def
update(self, subject, attrname, value):
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected