(self, other )
return other | self
Implementation of | operator when left operand is not a ParserElement
Implementation of | operator when left operand is not a ParserElement
Implementation of | operator when left operand is not a ParserElement
def __ror__(self, other ):
        """Implementation of | operator when left operand is not a ParserElement"""
        if isinstance( other, basestring ):
            other = Literal( other )
        if not isinstance( other, ParserElement ):
            warnings.warn("Cannot combine element of type %s with ParserElement" % type(other),
                    SyntaxWarning, stacklevel=2)
            return None
        return other | self
def __ror__ ( self , other ) : if isinstance ( other , basestring ) : other = Literal ( other ) if not isinstance ( other , ParserElement ) : warnings . warn ( "Cannot combine element of type %s with ParserElement" % type ( other ) , SyntaxWarning , stacklevel = 2 ) return None return other | self