mirror of
https://github.com/django/django.git
synced 2025-11-24 04:47:12 +00:00
Simplified various __eq__() methods.
This commit is contained in:
parent
129f4900be
commit
4508fafe16
8 changed files with 22 additions and 29 deletions
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue