Inherits from
- TraitHandler: enthought.traits.trait_handlers.TraitHandler
Attributes
Inherited from base classes
Method summary
- __init__(self, aType)
- get_editor(self, trait)
- info(self)
- validate(self, object, name, value)
Inherited from base classes
- arg_error(self, method, arg_num, object, name, value)
- create_editor(self)
- dup_arg_error(self, method, arg_num, object, name)
- error(self, object, name, value)
- full_info(self, object, name, value)
- inner_traits(self)
- is_valid(self, object, name, value)
- keyword_error(self, method, object, name, value)
- missing_arg_error(self, method, arg_num, object, name)
- repr(self, value)
- return_error(self, method, object, value)
Methods
- __init__(self, aType)
Creates a TraitCoerceType handler.
Parameters
- aType : type
- Either a Python type (e.g., str or types.StringType) or a Python value (e.g., 'cat')
Description
If aType is a value, it is mapped to its corresponding type. For example, the string 'cat' is automatically mapped to str (i.e., types.StringType).
- get_editor(self, trait)
- info(self)
- validate(self, object, name, value)