@extensionmethod(Observable)
def to_iterable(self):

    source = self

    def subscribe(observer):
        queue = []

        def on_next(item):
            queue.append(item)

        def on_completed():
            observer.on_next(queue)
            observer.on_completed()

        return source.subscribe(on_next, observer.on_error, on_completed)
    return AnonymousObservable(subscribe)
Creates an iterable from an observable sequence.
dataset/ETHPy150Open ReactiveX/RxPY/rx/linq/observable/toiterable.py/to_iterable