This commit is contained in:
Bertrand Benjamin 2018-09-20 18:27:40 +02:00
parent a343d62078
commit b63405592f
2 changed files with 9 additions and 2 deletions

View File

@ -43,8 +43,8 @@ class Expression(object):
def from_str(cls, string): def from_str(cls, string):
""" Initiate the expression from a string """ Initiate the expression from a string
:param string: TODO :param string: String to parse to generate the Expression
:returns: TODO :returns: the expression
""" """
t = Tree.from_str(string) t = Tree.from_str(string)

View File

@ -26,6 +26,13 @@ Abstracts tools for calculs manipulations
'2 + 3 * 4' '2 + 3 * 4'
>>> tree2tex(t) >>> tree2tex(t)
'2 + 3 \\times 4' '2 + 3 \\times 4'
>>> t = Tree.from_str("2+3x")
>>> print(t)
+
> 2
> *
| > 3
| > x
""" """