{ } Raw JSON

bundles / traitlets latest / traitlets / traitlets / Instance

class

traitlets.traitlets:Instance

source: /traitlets/traitlets.py :2192

Signature

class   Instance ( klass : str | type[T] | None = None args : tuple[t.Any, ...] | None = None kw : dict[str, t.Any] | None = None allow_none : bool = False read_only : bool | None = None help : str | None = None ** kwargs : t.Any )  →  None

Members

Summary

A trait whose value must be an instance of a specified class.

Extended Summary

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

Aliases

  • traitlets.Instance