def __iter__(self):
        for i in range(self.layer_count):
            yield self[i]
Allows for iteration over the layers in a data source.
dataset/ETHPy150Open django/django/django/contrib/gis/gdal/datasource.py/DataSource.__iter__