From b6da1e24a1881eefe25a73269732df078c340f8a Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand Date: Wed, 2 Mar 2016 17:13:21 +0300 Subject: [PATCH] dd docstring for explain for Explicable --- pymath/calculus/explicable.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pymath/calculus/explicable.py b/pymath/calculus/explicable.py index 11bffb5..dd9adcc 100644 --- a/pymath/calculus/explicable.py +++ b/pymath/calculus/explicable.py @@ -20,10 +20,20 @@ class Explicable(Renderable): self.steps = [] def explain(self, noself=True): - """ Generate and render steps which leed to itself + r""" Generate and render steps which leed to itself :param noself: does explain return self + >>> action = Explicable() + >>> from .expression import Expression + >>> action.postfix_tokens = Expression('42') + >>> action.this_append_before([Expression('2+10*4'), Expression('2+40')]) + >>> for i in action.explain(): + ... print(i) + 2 + 10 \times 4 + 2 + 40 + 42 + """ old_s = '' # les étapes pour l'atteindre