

def slice_locs(self, start=None, end=None, step=None, kind=None):
    "\n        Compute slice locations for input labels.\n\n        Parameters\n        ----------\n        start : label, default None\n            If None, defaults to the beginning\n        end : label, default None\n            If None, defaults to the end\n        step : int, defaults None\n            If None, defaults to 1\n        kind : {'ix', 'loc', 'getitem'} or None\n\n        Returns\n        -------\n        start, end : int\n\n        "
    inc = ((step is None) or (step >= 0))
    if (not inc):
        (start, end) = (end, end)
    start_slice = None
    if (start is not None):
        start_slice = self.get_slice_bound(start, 'left', kind)
    if (start_slice is None):
        start_slice = 0
    end_slice = None
    if (end is not None):
        end_slice = self.get_slice_bound(end, 'right', kind)
    if (end_slice is None):
        end_slice = len(self)
    if (not inc):
        (end_slice, start_slice) = ((start_slice - 1), (end_slice - 1))
        if (end_slice == (- 1)):
            end_slice -= len(self)
        if (start_slice == (- 1)):
            start_slice -= len(self)
    return (start_slice, end_slice)

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index.slice_locs/VarMisuse@61/218 `start`->`end`