Fix: replace notimplemented by NotImplementedError

This commit is contained in:
Bertrand Benjamin 2019-07-15 17:16:00 +02:00
parent 50f77c4d60
commit beb319f21d
1 changed files with 6 additions and 6 deletions

View File

@ -55,11 +55,11 @@ class Polynomial(Token):
@classmethod
def random(cls):
raise NotImplemented
raise NotImplementedError
def __setitem__(self, key, item):
""" Use Polynomial like if they were a dictionnary to set coefficients """
raise NotImplemented("Can't set coefficient of a polynomial")
raise NotImplementedError("Can't set coefficient of a polynomial")
def __getitem__(self, key):
""" Use Polynomial like if they were a dictionnary to get coefficients
@ -104,7 +104,7 @@ class Polynomial(Token):
@property
def roots(self):
""" Get roots of the Polynomial """
raise NotImplemented("Can't compute roots not specific polynomial")
raise NotImplementedError("Can't compute roots not specific polynomial")
class Linear(Polynomial):
@ -142,7 +142,7 @@ class Linear(Polynomial):
@classmethod
def random(cls):
raise NotImplemented
raise NotImplementedError
@property
def a(self):
@ -213,7 +213,7 @@ class Quadratic(Polynomial):
@classmethod
def random(cls):
raise NotImplemented
raise NotImplementedError
@property
def a(self):
@ -238,7 +238,7 @@ class Quadratic(Polynomial):
elif self.delta._mo == 0:
return [Expression.from_str(f"-{self.b}/(2*{self.a})").simplify()]
else:
raise NotImplemented("Todo!")
raise NotImplementedError("Todo!")