Pārlūkot izejas kodu

Added type-check to non-strict equivalence check.

Taddeus Kroes 14 gadi atpakaļ
vecāks
revīzija
8f90dd671c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/node.py

+ 1 - 1
src/node.py

@@ -276,7 +276,7 @@ class ExpressionNode(Node, ExpressionBase):
         - If both nodes are divisions, the nominator and denominator have to be
           non-strictly equal.
         """
-        if not other.is_op(self.op):
+        if not isinstance(other, ExpressionNode) or other.op != self.op:
             return False
 
         if self.op in (OP_ADD, OP_MUL):