Skip to content

Commit 32b02e3

Browse files
authored
Update fractional_cover_problem.py
1 parent 0d3bbfb commit 32b02e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: greedy_methods/fractional_cover_problem.py

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def __eq__(self, other: "Item") -> bool:
2727
>>> item1 == item3
2828
False
2929
"""
30+
if not isinstance(other, Item):
31+
return NotImplemented
3032
return self.weight == other.weight and self.value == other.value
3133

3234

0 commit comments

Comments
 (0)