Inherits from
- TraitType: enthought.traits.trait_handlers.TraitType
Attributes
- default_value_type
default_value_type = 5
- info_trait
info_trait = None
Method summary
- __init__(self, trait = None, value = None, minlen = 0, maxlen = sys.maxint, items = True, **metadata)
- create_editor(self)
- full_info(self, object, name, value)
- inner_traits(self)
- items_event(self)
- validate(self, object, name, value)
Inherited from base classes
- arg_error(self, method, arg_num, object, name, value)
- dup_arg_error(self, method, arg_num, object, name)
- error(self, object, name, value)
- get_editor(self, trait = None)
- info(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, trait = None, value = None, minlen = 0, maxlen = sys.maxint, items = True, **metadata)
Returns a List trait.
Parameters
- trait : a trait or value that can be converted to a trait using Trait()
- The type of item that the list contains. If not specified, the list can contain items of any type.
- value :
- Default value for the list
- minlen : integer
- The minimum length of a list that can be assigned to the trait.
- maxlen : integer
- The maximum length of a list that can be assigned to the trait.
The length of the list assigned to the trait must be such that:
minlen <= len(list) <= maxlen
Default Value
value or None
- create_editor(self)
Returns the default UI editor for the trait.
- full_info(self, object, name, value)
Returns a description of the trait.
- inner_traits(self)
Returns the inner trait (or traits) for this trait.
- items_event(self)
- validate(self, object, name, value)
Validates that the values is a valid list.