X-Git-Url: https://scm.cri.mines-paristech.fr/git/linpy.git/blobdiff_plain/b90f09da753f9c6b865d866bc4ef9097f1b763ac..5d2a146f1fa8ff16a9de6f35e74d59031fbcb575:/linpy/linexprs.py?ds=inline diff --git a/linpy/linexprs.py b/linpy/linexprs.py index 99ad4ec..492ea9e 100644 --- a/linpy/linexprs.py +++ b/linpy/linexprs.py @@ -131,8 +131,7 @@ class LinExpr: 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): @@ -179,8 +178,7 @@ class LinExpr: 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):