LLD - Behavioral Design Patterns — Part 2
In the following code snippet implementing the Interpreter pattern, what is the error?
class OrExpression:
def __init__(self, expr1, expr2):
self.expr1 = expr1
self.expr2 = expr2
def interpret(self, context):
return self.expr1.interpret(context) | self.expr2.interpret(context)
