dd docstring for explain for Explicable

This commit is contained in:
Benjamin Bertrand 2016-03-02 17:13:21 +03:00
parent ee03acf9fb
commit b6da1e24a1
1 changed files with 11 additions and 1 deletions

View File

@ -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