parameters: ( self, name )
return_statement: return self
docstring: Define name for this expression, makes debugging and exception messages clearer.
          
          Example::
              Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
              Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
docstring_summary: Define name for this expression, makes debugging and exception messages clearer.
          
          Example::
              Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
              Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
docstring_tokens: Define name for this expression makes debugging and exception messages clearer . Example :: Word ( nums ) . parseString ( ABC ) # - > Exception : Expected W : ( 0123 ... ) ( at char 0 ) ( line : 1 col : 1 ) Word ( nums ) . setName ( integer ) . parseString ( ABC ) # - > Exception : Expected integer ( at char 0 ) ( line : 1 col : 1 )
function: def setName( self, name ):
          """
          Define name for this expression, makes debugging and exception messages clearer.
          
          Example::
              Word(nums).parseString("ABC")  # -> Exception: Expected W:(0123...) (at char 0), (line:1, col:1)
              Word(nums).setName("integer").parseString("ABC")  # -> Exception: Expected integer (at char 0), (line:1, col:1)
          """
          self.name = name
          self.errmsg = "Expected " + self.name
          if hasattr(self,"exception"):
              self.exception.msg = self.errmsg
          return self
function_tokens: def setName ( self , name ) : self . name = name self . errmsg = "Expected " + self . name if hasattr ( self , "exception" ) : self . exception . msg = self . errmsg return self