Instantiating a default instance for an Enthought trait
Instantiating a default instance for an Enthought trait Question: Consider this simple minimal example: from traits.api import Instance, Str, HasTraits class Person(HasTraits): name = Str(“hooked”) class Chair(HasTraits): sitting = Instance(Person) t = Chair() print t.sitting.name This fails since t.sitting evaluates to None. Enthought’s traits module will enforce that the type of t.sitting is a Person …