Renamed ConceptMatch into ConceptExpression and added unit tests

This commit is contained in:
2020-01-15 19:44:32 +01:00
parent 8152f82c6b
commit 3789ef25d1
12 changed files with 109 additions and 88 deletions
+2 -2
View File
@@ -21,9 +21,9 @@ class PythonErrorNode(ErrorNode):
class PythonNode(Node):
def __init__(self, source, ast_, concepts=None):
def __init__(self, source, ast_=None, concepts=None):
self.source = source
self.ast_ = ast_
self.ast_ = ast_ if ast_ else ast.parse(source, mode="eval") if source else None
self.concepts = concepts or {} # when concepts are recognized in the expression
# def __repr__(self):