Part of twisted.python.constants View Source View In Hierarchy
Values
subclass contains constants which are associated with arbitrary values.| Class Method | lookupByValue | Retrieve a constant by its value or raise a ValueError if
there is no constant associated with that value. |
Inherited from _ConstantsContainer:
| Method | __new__ | Classes representing constants containers are not intended to be instantiated. |
| Class Method | lookupByName | Retrieve a constant by its name or raise a ValueError if
there is no constant associated with that name. |
| Class Method | iterconstants | Iteration over a Names subclass
results in all of the constants it contains. |
| Class Method | _initializeEnumerants | Find all of the NamedConstant
instances in the definition of cls, initialize them with
constant values, and build a mapping from their names to them to attach to
cls. |
| Class Method | _constantFactory | Construct the value for a new constant to add to this container. |
ValueError if
there is no constant associated with that value.| Parameters | value | The value of one of the constants defined by cls.
|
| Returns | The ValueConstant
associated with value.
| |
| Raises | ValueError | If value is not the value of one of the constants defined by
cls.
|