{ } Raw JSON

bundles / traitlets 5.15.0 / traitlets / traitlets / HasTraits / hold_trait_notifications

function

traitlets.traitlets:HasTraits.hold_trait_notifications

source: /traitlets/traitlets.py :1455

Signature

def   hold_trait_notifications ( self )  →  t.Any

Summary

Context manager for bundling trait change notifications and cross validation.

Extended Summary

Use this when doing multiple trait assignments (init, config), to avoid race conditions in trait notifiers requesting other trait values. All trait notifications will fire after all values have been assigned.

Aliases

  • traitlets.HasTraits.hold_trait_notifications