Simplified various __eq__() methods.

This commit is contained in:
Mads Jensen 2017-09-28 11:39:12 +02:00 committed by Tim Graham
parent 129f4900be
commit 4508fafe16
8 changed files with 22 additions and 29 deletions

View file

@ -190,10 +190,7 @@ class OGRGeometry(GDALBase):
def __eq__(self, other):
"Is this Geometry equal to the other?"
if isinstance(other, OGRGeometry):
return self.equals(other)
else:
return False
return isinstance(other, OGRGeometry) and self.equals(other)
def __str__(self):
"WKT is used for the string representation."