Inherits from
- ThisClass: enthought.traits.trait_handlers.ThisClass
Attributes
Inherited from base classes
Method summary
- __init__(self, aClass, allow_none = True, adapt = 'yes', module = '')
- allow_none(self)
- create_default_value(self, *args, **kw)
- find_class(self, aClass)
- info(self)
- resolve_class(self, object, name, value)
- set_fast_validate(self)
- validate(self, object, name, value)
- validate_class(self, aClass)
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, aClass, allow_none = True, adapt = 'yes', module = '')
Creates a TraitInstance handler.
Parameters
- aClass : class or type
- A Python class, an instance of a Python class, or a Python type
- allow_none : boolean
- Flag indicating whether None is accepted as a valid value (True or non-zero) or not (False or 0)
- adapt : string
Value indicating how adaptation should be handled:
- 'no' (-1): Adaptation is not allowed.
- 'yes' (0): Adaptation is allowed and should raise an exception if adaptation fails.
- 'default' (1): Adaption is allowed and should return the default value if adaptation fails.
- module : module
- The module that the class belongs to.
Description
If aClass is an instance, it is mapped to the class it is an instance of.
- allow_none(self)
- create_default_value(self, *args, **kw)
- find_class(self, aClass)
- info(self)
- resolve_class(self, object, name, value)
- set_fast_validate(self)
- validate(self, object, name, value)
- validate_class(self, aClass)