diff --git a/mapytex/calculus/API/expression.py b/mapytex/calculus/API/expression.py index 0b8dd05..335555d 100644 --- a/mapytex/calculus/API/expression.py +++ b/mapytex/calculus/API/expression.py @@ -43,8 +43,8 @@ class Expression(object): def from_str(cls, string): """ Initiate the expression from a string - :param string: TODO - :returns: TODO + :param string: String to parse to generate the Expression + :returns: the expression """ t = Tree.from_str(string) diff --git a/mapytex/calculus/core/__init__.py b/mapytex/calculus/core/__init__.py index dd1c797..9297e9a 100644 --- a/mapytex/calculus/core/__init__.py +++ b/mapytex/calculus/core/__init__.py @@ -26,6 +26,13 @@ Abstracts tools for calculs manipulations '2 + 3 * 4' >>> tree2tex(t) '2 + 3 \\times 4' +>>> t = Tree.from_str("2+3x") +>>> print(t) ++ + > 2 + > * + | > 3 + | > x """