From 374f0bc07ea25df778cd60c333c5b1c15d2d2ce9 Mon Sep 17 00:00:00 2001 From: Lafrite Date: Sat, 7 Mar 2015 18:22:46 +0100 Subject: [PATCH] change mainOp in polynom --- pymath/polynom.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pymath/polynom.py b/pymath/polynom.py index eb31271..f83788d 100644 --- a/pymath/polynom.py +++ b/pymath/polynom.py @@ -76,11 +76,13 @@ class Polynom(Explicable): - a: a Expression. [1, Expression("2+3"), 4] designate 1 + (2+3)x + 4x^2 :param letter: the string describing the unknown - >>> Polynom([1,2,3]).mainOp + >>> Polynom([1, 2, 3]).mainOp '+' >>> Polynom([1]).mainOp '*' - >>> Polynom([1,2, 3])._letter + >>> Polynom([0, 0, 3]).mainOp + '*' + >>> Polynom([1, 2, 3])._letter 'x' >>> Polynom([1, 2, 3], "y")._letter 'y' @@ -91,9 +93,9 @@ class Polynom(Explicable): if self.is_monom(): - self.mainOp = "*" + self.mainOp = op.mul else: - self.mainOp = "+" + self.mainOp = op.add self._isPolynom = 1