3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

add __hash__ to AstRef

AstRef objects needs to be hashable in order
to be used as keys in python dictionaries
This commit is contained in:
Patrick Totzke 2015-11-05 16:28:02 +00:00
parent 773f90f122
commit d4242e16c5

View file

@ -284,6 +284,9 @@ class AstRef(Z3PPObject):
def __repr__(self):
return obj_to_string(self)
def __hash__(self):
return self.hash()
def sexpr(self):
"""Return an string representing the AST node in s-expression notation.