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:
parent
773f90f122
commit
d4242e16c5
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue