register_trait()
Register a trait so it can be retrieved with get_trait().
Usage
register_trait(trait)Parameters
trait: TraitDefinition- The trait definition to register.
Raises
ValueError- If a trait with the same name is already registered.
Examples
import talk_box as tb
t = tb.create_trait("my_trait", description="Custom trait.")
tb.register_trait(t)
tb.get_trait("my_trait")