doctests
This commit is contained in:
parent
a343d62078
commit
b63405592f
@ -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)
|
||||||
|
@ -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
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user