this_append_before for explicable ans abstract_polynom
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user