From 6f888673868879dfd38050bcaedb93c7fd5bac66 Mon Sep 17 00:00:00 2001 From: Vivien Maisonneuve Date: Tue, 19 Aug 2014 14:35:14 +0200 Subject: [PATCH 1/1] Simplify LinExpr.coefficients() --- linpy/linexprs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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): -- 2.20.1