Add doctest
This commit is contained in:
parent
b1241e0844
commit
ec25cfab53
@ -210,6 +210,10 @@ def tree2tex(tree):
|
|||||||
|
|
||||||
It calls __tex__ to render MOs.
|
It calls __tex__ to render MOs.
|
||||||
|
|
||||||
|
:param tree: tree to render
|
||||||
|
|
||||||
|
:example:
|
||||||
|
|
||||||
>>> from ..tree import Tree
|
>>> from ..tree import Tree
|
||||||
>>> t = Tree.from_str("2+3*4")
|
>>> t = Tree.from_str("2+3*4")
|
||||||
>>> tree2tex(t)
|
>>> tree2tex(t)
|
||||||
|
@ -226,6 +226,10 @@ def tree2txt(tree):
|
|||||||
|
|
||||||
It calls __txt__ to render MOs.
|
It calls __txt__ to render MOs.
|
||||||
|
|
||||||
|
:param tree: tree to render
|
||||||
|
|
||||||
|
:example:
|
||||||
|
|
||||||
>>> from ..tree import Tree
|
>>> from ..tree import Tree
|
||||||
>>> t = Tree.from_str("2+3*4")
|
>>> t = Tree.from_str("2+3*4")
|
||||||
>>> tree2txt(t)
|
>>> tree2txt(t)
|
||||||
|
Loading…
Reference in New Issue
Block a user