From: Vivien Maisonneuve Date: Tue, 19 Aug 2014 12:35:14 +0000 (+0200) Subject: Simplify LinExpr.coefficients() X-Git-Tag: 1.0~58 X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/commitdiff_plain/6f888673868879dfd38050bcaedb93c7fd5bac66?ds=sidebyside;hp=b90f09da753f9c6b865d866bc4ef9097f1b763ac Simplify LinExpr.coefficients() --- diff --git a/linpy/linexprs.py b/linpy/linexprs.py index 99ad4ec..ab5d344 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):