Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watching dict #2

Open
idotzang opened this issue Jul 1, 2022 · 0 comments
Open

Watching dict #2

idotzang opened this issue Jul 1, 2022 · 0 comments

Comments

@idotzang
Copy link

idotzang commented Jul 1, 2022

It would be great if I could do something like this and have the callback fire for dict key changes:

`
class WatchedDict(Dict, metaclass=ObjectWatchdog):
callbacks = [callback]
pass

d = WatchedDict()
d["x"] = 1
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant