Part of twisted.python.constants View Source View In Hierarchy
_ConstantsContaineris a class with attributes used as symbolic constants. It is up to subclasses to specify what kind of constants are allowed.
|Method||__new__||Classes representing constants containers are not intended to be instantiated.|
|Class Method||lookupByName||Retrieve a constant by its name or raise a
|Class Method||iterconstants||Iteration over a
|Class Variable||_constantType||Specified by a
|Class Method||_initializeEnumerants||Find all of the
|Class Method||_constantFactory||Construct the value for a new constant to add to this container.|
_ConstantsContainersubclass to specify the type of constants allowed by that subclass.
The class object itself is used directly.
NamedConstantinstances in the definition of
cls, initialize them with constant values, and build a mapping from their names to them to attach to
ValueErrorif there is no constant associated with that name.