(e)
return expr_part, qexpr_part
Split an expression into Expr and noncommutative QExpr parts.
Split an expression into Expr and noncommutative QExpr parts.
Split an expression into Expr and noncommutative QExpr parts .
def split_qexpr_parts(e):
    """Split an expression into Expr and noncommutative QExpr parts."""
    expr_part = []
    qexpr_part = []
    for arg in e.args:
        if not isinstance(arg, QExpr):
            expr_part.append(arg)
        else:
            qexpr_part.append(arg)
    return expr_part, qexpr_part
def split_qexpr_parts ( e ) : expr_part = [ ] qexpr_part = [ ] for arg in e . args : if not isinstance ( arg , QExpr ) : expr_part . append ( arg ) else : qexpr_part . append ( arg ) return expr_part , qexpr_part