Merge pull request #3630 from jdufresne/simplify-eq

Slightly simplify Image.__eq__
This commit is contained in:
Andrew Murray 2019-02-16 14:03:48 +11:00 committed by GitHub
commit daa8b51339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -655,8 +655,7 @@ class Image(object):
return filename
def __eq__(self, other):
return (isinstance(other, Image) and
self.__class__.__name__ == other.__class__.__name__ and
return (self.__class__ is other.__class__ and
self.mode == other.mode and
self.size == other.size and
self.info == other.info and