Iterate over the pairs (symbol, value) of linear terms in the
expression. The constant term is ignored.
"""
- for symbol, coefficient in self._coefficients.items():
- yield symbol, coefficient
+ yield from self._coefficients.items()
@property
def constant(self):
Iterate over the coefficient values in the expression, and the constant
term.
"""
- for coefficient in self._coefficients.values():
- yield coefficient
+ yield from self._coefficients.values()
yield self._constant
def __bool__(self):