traits.constants Module¶
Classes¶
-
traits.constants.TraitKind= <enum 'TraitKind'>[source]¶ These determine the getters and setters used by the cTrait instance.
-
traits.constants.ValidateTrait= <enum 'ValidateTrait'>[source]¶ These are indices into the ctraits.c validate_handlers array.
-
traits.constants.ComparisonMode= <enum 'ComparisonMode'>[source]¶ Comparison mode.
Indicates when trait change notifications should be generated based upon the result of comparing the old and new values of a trait assignment:
Enumeration members:
- none
The values are not compared and a trait change notification is generated on each assignment.
- identity
A trait change notification is generated if the old and new values are not the same object.
- equality
A trait change notification is generated if the old and new values are not the same object, and not equal using Python’s standard equality testing. This is the default.
-
traits.constants.NO_COMPARE= <ComparisonMode.none: 0>¶ Deprecated alias for
ComparisonMode.none.
-
traits.constants.OBJECT_IDENTITY_COMPARE= <ComparisonMode.identity: 1>¶ Deprecated alias for
ComparisonMode.identity.
-
traits.constants.RICH_COMPARE= <ComparisonMode.equality: 2>¶ Deprecated alias for
ComparisonMode.equality.