We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d3bbfb commit 32b02e3Copy full SHA for 32b02e3
greedy_methods/fractional_cover_problem.py
@@ -27,6 +27,8 @@ def __eq__(self, other: "Item") -> bool:
27
>>> item1 == item3
28
False
29
"""
30
+ if not isinstance(other, Item):
31
+ return NotImplemented
32
return self.weight == other.weight and self.value == other.value
33
34
0 commit comments