Skip to content

Commit

Permalink
fix type comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jul 30, 2023
1 parent 9102b8c commit a92e445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyopencl/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def __repr__(self) -> str:
self.dtype)

def __eq__(self, other: Any) -> bool:
return (type(self) == type(other)
return (type(self) is type(other)
and self.dtype == other.dtype
and self.name == other.name)

Expand Down Expand Up @@ -812,7 +812,7 @@ def declarator(self) -> str:
return self.decl

def __eq__(self, other) -> bool:
return (type(self) == type(other)
return (type(self) is type(other)
and self.decl == other.decl
and self.name == other.name)

Expand Down

0 comments on commit a92e445

Please sign in to comment.