DumbNotifiedProperty fails when used with different objects
Closed this issue · 1 comments
eoinell commented
Running https://github.com/nanophotonics/nplab/blob/python3/nplab/instrument/spectrometer/__init__.py , the variable_int_enabled and filename DumbNotifiedProperties fail to callback their registered functions. [python3].
Notified properties seem to work fine however, and notified_property's docstring works fine with but dumb and ordinary notified properties.
eoinell commented
I traced why the registered functions weren't being called, the WeakSet
holding the callbacks was being garbage-collected. Replacing this with set
fixes this issue, at the potential cost of some memory.