MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __eq__

Method __eq__

project_euler/problem_054/sol1.py:337–340  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

335 # if you have a list of PokerHand objects, you can sort them just through
336 # the builtin functions.
337 def __eq__(self, other):
338 if isinstance(other, PokerHand):
339 return self.compare_with(other) == "Tie"
340 return NotImplemented
341
342 def __lt__(self, other):
343 if isinstance(other, PokerHand):

Callers

nothing calls this directly

Calls 1

compare_withMethod · 0.95

Tested by

no test coverage detected