Added class checking to __eq__ function

This commit is contained in:
Andrew Murray 2014-07-05 23:16:14 +10:00
parent 8e6ef35f78
commit 1aee9bfdef

View File

@ -573,6 +573,8 @@ class Image:
return file
def __eq__(self, other):
if self.__class__.__name__ != other.__class__.__name__:
return False
a = (self.mode == other.mode)
b = (self.size == other.size)
c = (self.getpalette() == other.getpalette())