Document that handlers (e.g., TraitType
subclasses) should be stateless
#1720
Labels
component: documentation
Issues related to the Sphinx documentation
I've seen a couple of instances recently where projects were trying to store per-object state in a
TraitType
instance. That doesn't work, in general: theTraitType
instance is per-class, not per-object.In the section of the user docs on writing your own
TraitType
subclass, it should be made clear thatTraitType
instances should be stateless: they shouldn't store per-object state from theHasTraits
objects using them.The text was updated successfully, but these errors were encountered: