code: def extend( self, itemseq ):
          
          if isinstance(itemseq, ParseResults):
              self += itemseq
          else:
              self.__toklist.extend(itemseq)
docs: Add sequence of elements to end of ParseResults list of elements.
  
          Example::
  
              patt = OneOrMore(Word(alphas))
  
              # use a parse action to append the reverse of the matched strings, to make a palindrome
              def make_palindrome(tokens):
                  tokens.extend(reversed([t[::-1] for t in tokens]))
                  return ''.join(tokens)
              print(patt.addParseAction(make_palindrome).parseString("lskdj sdlkjf lksd")) # -> 'lskdjsdlkjflksddsklfjkldsjdksl'