Commit 48fd1f14 authored by Nils Braun's avatar Nils Braun

Added an equality and hash function for Pythran expr

parent 33074672
......@@ -1506,6 +1506,15 @@ class PythranExpr(CType):
return True
def __eq__(self, other):
"""Equality operation for PythranExpr using the str representation"""
return str(self) == str(other)
def __hash__(self):
"""Hash function using the str representation"""
return hash(str(self))
class CConstType(BaseType):
is_const = 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment