trait_value Module

Defines the TraitValue class, used for creating special, dynamic trait values.


class traits.trait_value.BaseTraitValue[source]

Returns the low-level C-based trait for this TraitValue.

class traits.trait_value.TraitValue[source]
default = Callable

The callable used to define a default value:

args = Tuple

The positional arguments to pass to the callable default value:

kw = Dict

The keyword arguments to pass to the callable default value:

type = Any

The trait to use as the new trait type:

delegate = Instance( HasTraits )

The object to delegate the new value to:

name = Str

The name of the trait on the delegate object to get the new value from:


traits.trait_value.SyncValue(delegate, name)[source]
traits.trait_value.DefaultValue(default, args=(), kw={})[source]