bundles / traitlets 5.14.3 / traitlets / traitlets / observe_compat
function
traitlets.traitlets:observe_compat
source: /traitlets/traitlets.py :1110
Signature
def observe_compat ( func : FuncT ) → FuncT Summary
Backward-compatibility shim decorator for observers
Extended Summary
Use with:
@observe('name') @observe_compat def _foo_changed(self, change): ...
With this, super()._foo_changed(self, name, old, new) in subclasses will still work. Allows adoption of new observer API without breaking subclasses that override and super.
Aliases
-
traitlets.observe_compat