File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -307,23 +307,14 @@ def generic_repr(self):
307307 getattr (prn , f"print_{ self ._base_name } " )(self )
308308 return f'{ type (self ).__name__ } ("{ prn .get_str ()} ")'
309309
310- def generic_hash (self ):
311- return hash ((type (self ), str (self )))
312-
313- def generic_isl_hash (self ):
314- return self .get_hash ()
315-
316310 for cls in ALL_CLASSES :
317311 if (hasattr (cls , "_base_name" )
318312 and hasattr (Printer , f"print_{ cls ._base_name } " )):
319313 cls .__str__ = generic_str
320314 cls .__repr__ = generic_repr
321315
322- if not hasattr (cls , "get_hash" ):
323- cls .__hash__ = generic_hash
324-
325- if hasattr (cls , "get_hash" ):
326- cls .__hash__ = generic_isl_hash
316+ if not hasattr (cls , "__hash__" ):
317+ raise AssertionError (f"not hashable: { cls } " )
327318
328319 # }}}
329320
You can’t perform that action at this time.
0 commit comments