ModificationListener

class ModificationListener[source]

Bases: ABC

Interface for listener classes that want to be notified when an object property changes.

Notification will be received after the change has already occurred. It is not possible to veto a change using this class.

Note: this function require two functions to be implemented (on_setattr and on_delattr) rather than having one function switching on an enumeration to emphasise that this class is deliberately tied into the Python data model.

Methods Summary

on_delattr(modified_obj, attr)

on_setattr(modified_obj, attr, val)

Methods Documentation

abstractmethod on_delattr(modified_obj, attr)[source]
abstractmethod on_setattr(modified_obj, attr, val)[source]