(self, other )
return And( [ self, other ] )
Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement
        converts them to L{Literal}s by default.
        
        Example::
            greet = Word(alphas) + "," + Word(alphas) + "!"
            hello = "Hello, World!"
            print (hello, "->", greet.parseString(hello))
        Prints::
            Hello, World! -> ['Hello', ',', 'World', '!']
Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement
        converts them to L{Literal}s by default.
        
        Example::
            greet = Word(alphas) + "," + Word(alphas) + "!"
            hello = "Hello, World!"
            print (hello, "->", greet.parseString(hello))
        Prints::
            Hello, World! -> ['Hello', ',', 'World', '!']
Implementation of + operator - returns C { L { And }} . Adding strings to a ParserElement converts them to L { Literal } s by default . Example :: greet = Word ( alphas ) + + Word ( alphas ) + ! hello = Hello World! print ( hello - > greet . parseString ( hello )) Prints :: Hello World! - > [ Hello World ! ]
def __add__(self, other ):
        """
        Implementation of + operator - returns C{L{And}}. Adding strings to a ParserElement
        converts them to L{Literal}s by default.
        
        Example::
            greet = Word(alphas) + "," + Word(alphas) + "!"
            hello = "Hello, World!"
            print (hello, "->", greet.parseString(hello))
        Prints::
            Hello, World! -> ['Hello', ',', 'World', '!']
        """
        if isinstance( other, basestring ):
            other = ParserElement._literalStringClass( other )
        if not isinstance( other, ParserElement ):
            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
                    SyntaxWarning, stacklevel=2)
            return None
        return And( [ self, other ] )
def __add__ ( self , other ) : if isinstance ( other , basestring ) : other = ParserElement . _literalStringClass ( other ) if not isinstance ( other , ParserElement ) : warnings . warn ( "Cannot combine element of type %s with ParserElement" % type ( other ) , SyntaxWarning , stacklevel = 2 ) return None return And ( [ self , other ] )