bundles / traitlets 5.14.3 / traitlets / traitlets / BaseDescriptor
class
traitlets.traitlets:BaseDescriptor
source: /traitlets/traitlets.py :423
Signature
class BaseDescriptor ( ) Members
Summary
Base descriptor class
Notes
This implements Python's descriptor protocol.
This class is the base class for all such descriptors. The only magic we use is a custom metaclass for the main HasTraits class that does the following:
Sets the
nameattribute of every BaseDescriptor instance in the class dict to the name of the attribute.Sets the
this_classattribute of every BaseDescriptor instance in the class dict to the class that declared the trait. This is used by the This trait to allow subclasses to accept superclasses for This values.
Aliases
-
traitlets.BaseDescriptor