Skip to content

Commit c79f7a8

Browse files
author
Kirill Sibirev
committed
__hash__ for Package class
1 parent 7d47522 commit c79f7a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

debparse/deb_control/classes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def id(self):
8686
if self.type == 'binary':
8787
return self['Package'].text
8888

89+
def __hash__(self):
90+
return hash(self.type) ^ hash(self.id)
91+
8992
# TODO:
9093
# * Every field value must be FieldValue inheritor, it
9194
# should have type, format or is_list at least. So we need to make

0 commit comments

Comments
 (0)