mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-05 06:00:58 +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
|
return file
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
|
if self.__class__.__name__ != other.__class__.__name__:
|
||||||
|
return False
|
||||||
a = (self.mode == other.mode)
|
a = (self.mode == other.mode)
|
||||||
b = (self.size == other.size)
|
b = (self.size == other.size)
|
||||||
c = (self.getpalette() == other.getpalette())
|
c = (self.getpalette() == other.getpalette())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user