parameters: (self)
docstring: r"""
          Returns the results name for this token expression. Useful when several
          different expressions might match at a particular location.
  
          Example::
  
              integer = Word(nums)
              ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
              house_number_expr = Suppress('#') + Word(nums, alphanums)
              user_data = (Group(house_number_expr)("house_number")
                          | Group(ssn_expr)("ssn")
                          | Group(integer)("age"))
              user_info = OneOrMore(user_data)
  
              result = user_info.parseString("22 111-22-3333 #221B")
              for item in result:
                  print(item.getName(), ':', item[0])
  
          prints::
  
              age : 22
              ssn : 111-22-3333
              house_number : 221B
docstring_summary: r"""
          Returns the results name for this token expression. Useful when several
          different expressions might match at a particular location.
docstring_tokens: r Returns the results name for this token expression . Useful when several different expressions might match at a particular location .
function: def getName(self):
          r"""
          Returns the results name for this token expression. Useful when several
          different expressions might match at a particular location.
  
          Example::
  
              integer = Word(nums)
              ssn_expr = Regex(r"\d\d\d-\d\d-\d\d\d\d")
              house_number_expr = Suppress('#') + Word(nums, alphanums)
              user_data = (Group(house_number_expr)("house_number")
                          | Group(ssn_expr)("ssn")
                          | Group(integer)("age"))
              user_info = OneOrMore(user_data)
  
              result = user_info.parseString("22 111-22-3333 #221B")
              for item in result:
                  print(item.getName(), ':', item[0])
  
          prints::
  
              age : 22
              ssn : 111-22-3333
              house_number : 221B
          """
          if self.__name:
              return self.__name
          elif self.__parent:
              par = self.__parent()
              if par:
                  return par.__lookup(self)
              else:
                  return None
          elif (len(self) == 1
                and len(self.__tokdict) == 1
                and next(iter(self.__tokdict.values()))[0][1] in (0, -1)):
              return next(iter(self.__tokdict.keys()))
          else:
              return None
function_tokens: def getName ( self ) : if self . __name : return self . __name elif self . __parent : par = self . __parent ( ) if par : return par . __lookup ( self ) else : return None elif ( len ( self ) == 1 and len ( self . __tokdict ) == 1 and next ( iter ( self . __tokdict . values ( ) ) ) [ 0 ] [ 1 ] in ( 0 , - 1 ) ) : return next ( iter ( self . __tokdict . keys ( ) ) ) else : return None