parameters: (cls, name)
docstring: Retrieve a constant by its name or raise a C{ValueError} if there is no
          constant associated with that name.
  
          @param name: A C{str} giving the name of one of the constants defined by
              C{cls}.
  
          @raise ValueError: If C{name} is not the name of one of the constants
              defined by C{cls}.
  
          @return: The L{NamedConstant} associated with C{name}.
docstring_summary: Retrieve a constant by its name or raise a C{ValueError} if there is no
          constant associated with that name.
docstring_tokens: Retrieve a constant by its name or raise a C { ValueError } if there is no constant associated with that name .
function: def lookupByName(cls, name):
          """
          Retrieve a constant by its name or raise a C{ValueError} if there is no
          constant associated with that name.
  
          @param name: A C{str} giving the name of one of the constants defined by
              C{cls}.
  
          @raise ValueError: If C{name} is not the name of one of the constants
              defined by C{cls}.
  
          @return: The L{NamedConstant} associated with C{name}.
          """
          if name in cls._enumerants:
              return getattr(cls, name)
          raise ValueError(name)
function_tokens: def lookupByName ( cls , name ) : if name in cls . _enumerants : return getattr ( cls , name ) raise ValueError ( name )