Home | Trees | Indices | Help |
|
---|
|
object --+ | list --+ | UnorderedList --+ | RestrictedContentList
Class representing a list containing only object with certain values.
This is an unordered list.
We override the append
, insert
and
extend
methods to ensure that any item added to the list is
among the valid values. We use a standard comparison, so pretty much
anything can be in the list of valid values.
The valuesDescr
value will be used in exceptions, i.e.
"Item must be one of values in VALID_ACTIONS"
if
valuesDescr
is "VALID_ACTIONS"
.
Note: This class doesn't make any attempt to trap for nonsensical arguments. All of the values in the values list should be of the same type (i.e. strings). Then, all list operations also need to be of that type (i.e. you should always insert or append just strings). If you mix types -- for instance lists and strings -- you will likely see AttributeError exceptions or other problems.
|
|||
new empty list |
|
||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
Initializes a list restricted to containing certain values.
|
Overrides the standard
|
Overrides the standard
|
Overrides the standard
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |