(func, e, cond=None)
return e.func(*[
        _eapply(func, ei) if (cond is None or cond(ei)) else ei
        for ei in e.args])
Apply ``func`` to ``e`` if all args are Exprs else only
    apply it to those args that *are* Exprs.
Apply ``func`` to ``e`` if all args are Exprs else only
    apply it to those args that *are* Exprs.
Apply func to e if all args are Exprs else only apply it to those args that * are * Exprs .
def _eapply(func, e, cond=None):
    """Apply ``func`` to ``e`` if all args are Exprs else only
    apply it to those args that *are* Exprs."""
    if not isinstance(e, Expr):
        return e
    if _is_Expr(e) or not e.args:
        return func(e)
    return e.func(*[
        _eapply(func, ei) if (cond is None or cond(ei)) else ei
        for ei in e.args])
def _eapply ( func , e , cond = None ) : if not isinstance ( e , Expr ) : return e if _is_Expr ( e ) or not e . args : return func ( e ) return e . func ( * [ _eapply ( func , ei ) if ( cond is None or cond ( ei ) ) else ei for ei in e . args ] )