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 ] )
Takes care of converting an object (non-String) response to the appropriate format, based on the what the caller can accept.
dataset/ETHPy150Open pypa/pip/pip/_vendor/pyparsing.py/ParserElement.__add__--crossover with--dataset/ETHPy150Open jacek99/corepost/corepost/routing.py/RequestRouter.__convertObjectToContentType