bundles / traitlets 5.14.3 / traitlets / traitlets / Instance
class
traitlets.traitlets:Instance
source: /traitlets/traitlets.py :2184
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
-
__init__ -
_resolve_classes -
default_value_repr -
from_string -
info -
instance_init -
make_dynamic_default -
validate
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