Enhanced ExecutionContext to keep track of the execution flow

This commit is contained in:
2020-01-07 15:47:43 +01:00
parent ffd98d7407
commit b4346b5af0
19 changed files with 966 additions and 190 deletions
+9 -1
View File
@@ -186,7 +186,12 @@ class ReturnValueConcept(Concept):
self.message == other.message
def __hash__(self):
return hash((self.who, self.status, self.value))
if hasattr(self.value, "__iter__") and not isinstance(self.value, str):
value_hash = hash(tuple(self.value))
else:
value_hash = hash(self.value)
return hash((self.who, self.status, value_hash))
class UnknownPropertyConcept(Concept):
@@ -233,6 +238,9 @@ class ParserResultConcept(Concept):
self.body == other.body and \
self.try_parsed == other.try_parsed
def __hash__(self):
return hash(self.metadata.name)
@property
def value(self):
return self.body