mirror of https://github.com/django/django.git
Made LineString.__iter__() return iter() from internal GEOSCoordSeq both for simplicity and performance.
This commit is contained in:
parent
1a742ea33b
commit
138a78ec8c
|
@ -92,8 +92,7 @@ class LineString(LinearGeometryMixin, GEOSGeometry):
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
"Allow iteration over this LineString."
|
"Allow iteration over this LineString."
|
||||||
for i in range(len(self)):
|
return iter(self._cs)
|
||||||
yield self[i]
|
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
"Return the number of points in this LineString."
|
"Return the number of points in this LineString."
|
||||||
|
|
Loading…
Reference in New Issue