Ask Your Question

Revision history [back]

Based on your research of calling .operator() on an expression, you have to find where mul_vararg (and similarly add_vararg) are defined, so you can compare with them. Here it is:

sage: from sage.symbolic.operators import add_vararg, mul_vararg
sage: expr_a = 3 + x
sage: expr_a.operator() == add_vararg
True
sage: expr_m = 3*x
sage: expr_m.operator() == mul_vararg
True