t.p.c.Values(_ConstantsContainer) : class documentation

Part of twisted.python.constants View Source View In Hierarchy

Known subclasses: twisted.positioning.nmea.GPGGAFixQualities, twisted.positioning.nmea.GPGLLGPRMCFixQualities, twisted.positioning.nmea.GPGSAFixTypes, twisted.python.constants.Flags

A 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 Variable _constantType Specified by a _ConstantsContainer subclass to specify the type of constants allowed by that subclass.
Class Variable _enumerants A dict mapping the names of constants (eg NamedConstant instances) found in the class definition to those instances.
Class Method _constantFactory Construct the value for a new constant to add to this container.
@classmethod
def lookupByValue(cls, value): (source)
Retrieve a constant by its value or raise a ValueError if there is no constant associated with that value.
ParametersvalueThe value of one of the constants defined by cls.
ReturnsThe ValueConstant associated with value.
RaisesValueErrorIf value is not the value of one of the constants defined by cls.
API Documentation for Twisted, generated by pydoctor at 2014-05-12 18:27:00.