From 89d7baaed23c45257dfcd433db02b764424f5f8d Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Thu, 4 Oct 2018 08:13:20 +0200 Subject: [PATCH] Doc(Tree): Add solution to doctest in balance --- mapytex/calculus/core/tree.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mapytex/calculus/core/tree.py b/mapytex/calculus/core/tree.py index a98fb22..d64d4e4 100644 --- a/mapytex/calculus/core/tree.py +++ b/mapytex/calculus/core/tree.py @@ -702,6 +702,23 @@ class Tree(object): >>> t = Tree.from_str("1+2+3+4+5*6*7*8*9") >>> bal_t = t.balance() >>> print(bal_t) + + + > + + | > + + | | > + + | | | > 1 + | | | > 2 + | | > 3 + | > 4 + > * + | > * + | | > * + | | | > 5 + | | | > 6 + | | > 7 + | > * + | | > 8 + | | > 9 """ try: l_depth = self.left_value.depth()