Returns a sliceble version of data, convert to list if not yet sliceble.
(data)
| 148 | ] |
| 149 | |
| 150 | def make_sliceable(data): |
| 151 | """ Returns a sliceble version of data, convert to list if not yet sliceble. """ |
| 152 | try: |
| 153 | data[0:0] |
| 154 | return data |
| 155 | except TypeError: |
| 156 | return list(data) |
| 157 | except Exception: |
| 158 | return [] |
| 159 | |
| 160 | def is_finite_iterable(data): |
| 161 | """ Returns 'True' if 'data' is finite iterable. """ |
nothing calls this directly
no outgoing calls
no test coverage detected