From b1241e0844ac72b60c7d037bde8e9b8f1c655a81 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Mon, 17 Sep 2018 16:27:08 +0200 Subject: [PATCH] documentate what we can do with core --- mapytex/calculus/core/__init__.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/mapytex/calculus/core/__init__.py b/mapytex/calculus/core/__init__.py index 47ae35f..dd1c797 100644 --- a/mapytex/calculus/core/__init__.py +++ b/mapytex/calculus/core/__init__.py @@ -6,10 +6,33 @@ # # Distributed under terms of the MIT license. -""" +r""" Abstracts tools for calculs manipulations + +:example: + +>>> t = Tree.from_str("2+3*4") +>>> print(t) ++ + > 2 + > * + | > 3 + | > 4 +>>> print(t.apply_on_last_level(compute)) ++ + > 2 + > 12 +>>> tree2txt(t) +'2 + 3 * 4' +>>> tree2tex(t) +'2 + 3 \\times 4' + """ +from .tree import Tree +from .compute import compute +from .renders import tree2txt, tree2tex + # ----------------------------- # Reglages pour 'vim'