Skip to content

Commit

Permalink
__hash__ for Package class
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Sibirev committed Aug 28, 2015
1 parent 7d47522 commit c79f7a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions debparse/deb_control/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def id(self):
if self.type == 'binary':
return self['Package'].text

def __hash__(self):
return hash(self.type) ^ hash(self.id)

# TODO:
# * Every field value must be FieldValue inheritor, it
# should have type, format or is_list at least. So we need to make
Expand Down

0 comments on commit c79f7a8

Please sign in to comment.