mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Added class checking to __eq__ function
This commit is contained in:
parent
8e6ef35f78
commit
1aee9bfdef
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue
Block a user