steal_history in explicable

This commit is contained in:
Benjamin Bertrand 2016-03-09 09:27:27 +03:00
parent 7f891956fc
commit 351a9002be
1 changed files with 12 additions and 0 deletions

View File

@ -128,6 +128,18 @@ class Explicable(Renderable):
"""
self.steps = steps + self.steps
def steal_history(self, arg1):
""" Steal the history of arg1 for itself
:param arg1: a potential Explicable
"""
try:
self.this_append_before(list(arg1.explain()))
except AttributeError:
pass
@staticmethod
def merge_history(explicables):
r""" Take a list of Explicable objects, explain where they are from and merge their history