Simplified GEOSCoordSeq._checkindex().

This commit is contained in:
Sergey Fedoseev 2017-07-12 22:09:00 +05:00 committed by Tim Graham
parent be8d5bd703
commit 59cad72636
1 changed files with 1 additions and 2 deletions

View File

@ -66,8 +66,7 @@ class GEOSCoordSeq(GEOSBase):
# #### Internal Routines ####
def _checkindex(self, index):
"Check the given index."
sz = self.size
if (sz < 1) or (index < 0) or (index >= sz):
if not (0 <= index < self.size):
raise IndexError('invalid GEOS Geometry index: %s' % index)
def _checkdim(self, dim):