Recommented way to implement observable collections in Python?
问题 I would like to have some observable collections/sequences in Python that allow me to listen on change events, like for adding new items or updating items: list = ObservableList(['a','b','c']) list.addChangeListener(lambda new_value: print(new_value)) list.append('a') # => should trigger the attached change listener data_frame = ObservableDataFrame({'x': [1,2,3], 'y':[10,20,30]}) data_frame.addChangeListener(update_dependent_table_cells) # => allows to only update dependent cells instead of a