'The fallback printer.'

def emptyPrinter(self, expr):

    if isinstance(expr, str):
        return expr
    elif hasattr(expr, '__srepr__'):
        return expr.__srepr__()
    elif (hasattr(expr, 'args') and hasattr(expr.args, '__iter__')):
        l = []
        for o in expr.args:
            l.append(self._print(o))
        return (expr.__class__.__name__ + ('(%s)' % ',    '.join(l)))
    elif (hasattr(expr, '__module__') and hasattr(expr, '__name__')):
        return ("<'%s.%s'>" % (expr.__module__, expr.__name__))
    else:
        return str(expr)
