Skip to content

Commit

Permalink
add early type comparison to PdsLidVid.__eq__
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdunnjpl committed Jan 31, 2024
1 parent b4e2657 commit d2ccfea
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def __repr__(self):
return f"PdsLidVid({str(self)})"

def __eq__(self, other):
if not isinstance(other, PdsLidVid):
return False

return self.lid == other.lid and self.vid == other.vid

def __lt__(self, other: PdsLidVid):
Expand Down

0 comments on commit d2ccfea

Please sign in to comment.