Fixed some misbehaviours regarding question() + added #import functionality when restoring
This commit is contained in:
@@ -181,6 +181,7 @@ BuiltinErrors = [str(e) for e in {
|
||||
BuiltinConcepts.NOT_FOUND,
|
||||
BuiltinConcepts.INVALID_LESSER_OPERATION,
|
||||
BuiltinConcepts.INVALID_GREATEST_OPERATION,
|
||||
# DO NOT PUT NOT_INITIALIZED. It's not an error
|
||||
}]
|
||||
|
||||
"""
|
||||
@@ -534,3 +535,15 @@ class PythonSecurityError(Concept):
|
||||
self.set_value("column", column) # column number
|
||||
self.set_value(ConceptParts.BODY, source_code) # code being executed
|
||||
self.metadata.is_evaluated = True
|
||||
|
||||
|
||||
class NotFound(Concept):
|
||||
def __init__(self, body=None):
|
||||
super().__init__(BuiltinConcepts.NOT_FOUND,
|
||||
True,
|
||||
False,
|
||||
BuiltinConcepts.NOT_FOUND)
|
||||
self.set_value(ConceptParts.BODY, body)
|
||||
|
||||
def __repr__(self):
|
||||
return f"({self.metadata.id}){self.metadata.name}, body={self.get_value(ConceptParts.BODY)}"
|
||||
|
||||
Reference in New Issue
Block a user