Fix: clean __init__

This commit is contained in:
Bertrand Benjamin 2019-10-30 20:59:09 +01:00
parent b84cf047bd
commit e596c1af60
1 changed files with 2 additions and 7 deletions

View File

@ -33,14 +33,9 @@ class Polynomial(Token):
def __init__(self, a, name="", ancestor=None):
""" Initiate Polynomial with a MO"""
if not isinstance(a, MO):
if isinstance(a, str):
raise TypeError
else:
raise TypeError
else:
mo = a
raise TypeError
Token.__init__(self, mo, name, ancestor)
Token.__init__(self, a, name, ancestor)
self._mathtype = "polynome"
@classmethod