Made LineString.__iter__() return iter() from internal GEOSCoordSeq both for simplicity and performance.

This commit is contained in:
Sergey Fedoseev 2017-07-12 22:13:57 +05:00
parent 1a742ea33b
commit 138a78ec8c
1 changed files with 1 additions and 2 deletions

View File

@ -92,8 +92,7 @@ class LineString(LinearGeometryMixin, GEOSGeometry):
def __iter__(self):
"Allow iteration over this LineString."
for i in range(len(self)):
yield self[i]
return iter(self._cs)
def __len__(self):
"Return the number of points in this LineString."