@extensionmethod(Observable)
def __getitem__(self, key):

    if isinstance(key, slice):
        start, stop, step = key.start, key.stop, key.step
    elif isinstance(key, int):
        start, stop, step = key, key + 1, 1
    else:
        raise TypeError("Invalid argument type.")

    return self.slice(start, stop, step)
Slices the given observable using Python slice notation. The
dataset/ETHPy150Open ReactiveX/RxPY/rx/linq/observable/slice.py/__getitem__