From a2cf0e8adababe0cdadde352e9cd787d2dad7b42 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl <alexfikl@gmail.com> Date: Sun, 30 Jul 2023 17:13:37 +0300 Subject: [PATCH] fix type comparison --- pymbolic/primitives.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymbolic/primitives.py b/pymbolic/primitives.py index 329dd88..7f80b17 100644 --- a/pymbolic/primitives.py +++ b/pymbolic/primitives.py @@ -576,7 +576,7 @@ class Expression(ABC): # {{{ hash/equality backend def is_equal(self, other): - return (type(other) == type(self) + return (type(other) is type(self) and self.__getinitargs__() == other.__getinitargs__()) def get_hash(self): -- GitLab