this_append_before for explicable ans abstract_polynom

This commit is contained in:
Benjamin Bertrand
2016-03-02 16:52:42 +03:00
parent 5d4fe72764
commit 1ecdb458ae
2 changed files with 34 additions and 13 deletions

View File

@@ -61,6 +61,23 @@ class Explicable(Renderable):
else:
return False
def this_append_before(self, steps):
""" Add steps at the beginning of self.steps
:param steps: list of steps that append before
>>> e = Explicable()
>>> s = ['eat', 'sleep']
>>> e.this_append_before(s)
>>> print(e.steps)
['eat', 'sleep']
>>> s0 = ['cook']
>>> e.this_append_before(s0)
>>> print(e.steps)
['cook', 'eat', 'sleep']
"""
self.steps = steps + self.steps
class Explicable_int(int, Explicable):
""" An Explicable_int is an int which can be explain """
isNumber = True