single_or_composite_expression

proveit.single_or_composite_expression(expr_or_exprs, wrap_expr_range_in_tuple=True, do_singular_reduction=False)[source]

Put the approriate CompositeExpression wrapper around a list (iterable) or dictionary of Expressions, or simply return the given Expression if it is one. If wrap_expr_range_in_tuple, wrap an ExprRange in an ExprTuple. If do_singular_reduction is True and the result is an ExprTuple with one item that is neither an ExprRange nor a nested ExprTuple, return the single item.