1. Michał Górny
  2. gentoopm

Commits

Michał Górny  committed 494089c

PMPackage: support '!=' and hashing.

  • Participants
  • Parent commits 57df866
  • Branches master

Comments (0)

Files changed (1)

File gentoopm/basepm/pkg.py

View file
  • Ignore whitespace
 			return False
 		return self.id == other.id
 
+	def __ne__(self, other):
+		return not self.__eq__(other)
+
+	def __hash__(self):
+		return hash(self.id)
+
 	def __repr__(self):
 		return '%s(%s)' % (self.__class__.__name__, repr(self.id))