value
evaluate()
Add.
leaves
The leaves of the expression tree.
The leaves of an Operation are all the args which do not themselves have a leaves property.
Operation
args
Examples
>>> x, y = Variable('x'), Variable('y') >>> expr = (42 + x * y * 3.5) * 2 >>> expr.leaves == {42, x, y, 3.5, 2} True