diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-07-12 22:13:57 +0500 |
|---|---|---|
| committer | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2017-07-12 22:13:57 +0500 |
| commit | 138a78ec8cab5e1df0c8ba2a3ee895cb756ff1ae (patch) | |
| tree | 597930bc55310969d38bc6c9d1d602cbf3a5ec1a | |
| parent | 1a742ea33b075731da4cf034eecff5bcac8f6f06 (diff) | |
Made LineString.__iter__() return iter() from internal GEOSCoordSeq both for simplicity and performance.
| -rw-r--r-- | django/contrib/gis/geos/linestring.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/contrib/gis/geos/linestring.py b/django/contrib/gis/geos/linestring.py index eb339658e9..dd220d2bc3 100644 --- a/django/contrib/gis/geos/linestring.py +++ b/django/contrib/gis/geos/linestring.py @@ -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." |
