Lines 72-78
Link Here
|
72 |
def __getitem__(self, value): |
72 |
def __getitem__(self, value): |
73 |
"""Support dictionary, list, and slice -like access to the datasource. |
73 |
"""Support dictionary, list, and slice -like access to the datasource. |
74 |
ds[0] would return the first layer on the datasource. |
74 |
ds[0] would return the first layer on the datasource. |
75 |
ds['aname'] would return the layer named "aname". |
75 |
ds['aname'] would return the layer named "aname". |
76 |
ds[0:4] would return a list of the first four layers.""" |
76 |
ds[0:4] would return a list of the first four layers.""" |
77 |
if isinstance(value, slice): |
77 |
if isinstance(value, slice): |
78 |
output = [] |
78 |
output = [] |
Lines 143-148
Link Here
|
143 |
def __getitem__(self, value): |
143 |
def __getitem__(self, value): |
144 |
"""Support list and slice -like access to the layer. |
144 |
"""Support list and slice -like access to the layer. |
145 |
layer[0] would return the first feature on the layer. |
145 |
layer[0] would return the first feature on the layer. |
146 |
layer[0:4] would return a list of the first four features.""" |
146 |
layer[0:4] would return a list of the first four features.""" |
147 |
if isinstance(value, slice): |
147 |
if isinstance(value, slice): |
148 |
import sys |
148 |
import sys |