diff --git a/mapytex/calculus/API/tokens/polynomial.py b/mapytex/calculus/API/tokens/polynomial.py index c58a90a..82de79c 100644 --- a/mapytex/calculus/API/tokens/polynomial.py +++ b/mapytex/calculus/API/tokens/polynomial.py @@ -57,6 +57,10 @@ class Polynomial(Token): def random(cls): raise NotImplementedError + @property + def raw(self): + raise NotImplementedError("Polynomial does not exists in python") + def __setitem__(self, key, item): """ Use Polynomial like if they were a dictionnary to set coefficients """ raise NotImplementedError("Can't set coefficient of a polynomial") diff --git a/mapytex/calculus/API/tokens/token.py b/mapytex/calculus/API/tokens/token.py index b554d98..0d57836 100644 --- a/mapytex/calculus/API/tokens/token.py +++ b/mapytex/calculus/API/tokens/token.py @@ -84,6 +84,11 @@ class Token(object): def __tex__(self): return self._mo.__tex__ + @property + def raw(self): + """ Get python's raw forme of the token """ + return self._mo.value + def _operate(self, other, operation): """ Make a operation between 2 Tokens """ from ..expression import Expression