change mainOp in polynom
This commit is contained in:
parent
c832ae5742
commit
374f0bc07e
|
@ -80,6 +80,8 @@ class Polynom(Explicable):
|
||||||
'+'
|
'+'
|
||||||
>>> Polynom([1]).mainOp
|
>>> Polynom([1]).mainOp
|
||||||
'*'
|
'*'
|
||||||
|
>>> Polynom([0, 0, 3]).mainOp
|
||||||
|
'*'
|
||||||
>>> Polynom([1, 2, 3])._letter
|
>>> Polynom([1, 2, 3])._letter
|
||||||
'x'
|
'x'
|
||||||
>>> Polynom([1, 2, 3], "y")._letter
|
>>> Polynom([1, 2, 3], "y")._letter
|
||||||
|
@ -91,9 +93,9 @@ class Polynom(Explicable):
|
||||||
|
|
||||||
|
|
||||||
if self.is_monom():
|
if self.is_monom():
|
||||||
self.mainOp = "*"
|
self.mainOp = op.mul
|
||||||
else:
|
else:
|
||||||
self.mainOp = "+"
|
self.mainOp = op.add
|
||||||
|
|
||||||
self._isPolynom = 1
|
self._isPolynom = 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue