Fix Pylint: W0110: (deprecated-lambda)

divide_chemical_expression: map/filter on lambda could be replaced by
comprehension
This commit is contained in:
stv
2014-11-17 15:27:59 -05:00
parent 11020cf115
commit b4c4d18e9f

View File

@@ -340,11 +340,10 @@ def divide_chemical_expression(s1, s2, ignore_state=False):
return False
if any(
map(
lambda x, y: x / y - treedic['1 factors'][0] / treedic['2 factors'][0],
treedic['1 factors'],
treedic['2 factors'],
)
[
x / y - treedic['1 factors'][0] / treedic['2 factors'][0]
for (x, y) in zip(treedic['1 factors'], treedic['2 factors'])
]
):
# factors are not proportional
return False