Arek Bulski wrote:
def __glob_eq__(a,b):
  if not a == b:
      raise FoundInequalityError(a,b)
  return True

assert obj1 == obj2   #<-- using eq above

How would you ensure that this overriding only applied in
the places you want it? You don't want to change the meaning
of == in the code under test!

Related to that, how would you prevent the use of ==
in the definition of __glob_eq__ above from triggering infinite

Python-ideas mailing list
Code of Conduct:

Reply via email to