MCPcopy Index your code
hub / github.com/RustPython/RustPython / EqObject

Class EqObject

extra_tests/snippets/builtin_set.py:386–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384
385
386class EqObject:
387 def __init__(self, eq):
388 self.eq = eq
389
390 def __eq__(self, other):
391 return self.eq
392
393 def __hash__(self):
394 return bool(self.eq)
395
396
397assert "x" == (EqObject("x") == EqObject("x"))

Callers 1

builtin_set.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected