rx/operators/observable/fromiterable.py
def from_iterable(iterable: Iterable) -> ObservableBase:
    """Converts an iterable to an observable sequence.

    1 - res = from_iterable([1,2,3])

    Keyword arguments:
    iterable - An python iterable

    Returns the observable sequence whose elements are pulled from the
    given iterable sequence.
    """

    def subscribe(observer, scheduler=None):
        scheduler = scheduler or current_thread_scheduler
        iterator = iter(iterable)
        disposed = False

        def action(_: Scheduler, __: Any = None):
            nonlocal disposed

            try:
                while not disposed:
                    value = next(iterator)
                    observer.on_next(value)
            except StopIteration:
                observer.on_completed()
            except Exception as error:  # pylint: disable=W0703
                observer.on_error(error)

        def dispose():
            nonlocal disposed
            disposed = True

        disposable = AnonymousDisposable(dispose)
        return CompositeDisposable(scheduler.schedule(action), disposable)
    return AnonymousObservable(subscribe)
Converts an iterable to an observable sequence.

    1 - res = from_iterable([1,2,3])

    Keyword arguments:
    iterable - An python iterable

    Returns the observable sequence whose elements are pulled from the
    given iterable sequence.
    
Converts an iterable to an observable sequence.

Keyword arguments:
iterable - An python iterable

Returns the observable sequence whose elements are pulled from the
given iterable sequence.
Converts an iterable to an observable sequence . Keyword arguments : iterable - An python iterable Returns the observable sequence whose elements are pulled from the given iterable sequence .
def from_iterable(iterable: Iterable) -> ObservableBase:
    def subscribe(observer, scheduler=None):
        scheduler = scheduler or current_thread_scheduler
        iterator = iter(iterable)
        disposed = False
        def action(_: Scheduler, __: Any = None):
            nonlocal disposed
            try:
                while not disposed:
                    value = next(iterator)
                    observer.on_next(value)
            except StopIteration:
                observer.on_completed()
            except Exception as error:  
                observer.on_error(error)
        def dispose():
            nonlocal disposed
            disposed = True
        disposable = AnonymousDisposable(dispose)
        return CompositeDisposable(scheduler.schedule(action), disposable)
    return AnonymousObservable(subscribe)
def from_iterable ( iterable : Iterable ) -> ObservableBase : def subscribe ( observer , scheduler = None ) : scheduler = scheduler or current_thread_scheduler iterator = iter ( iterable ) disposed = False def action ( _ : Scheduler , __ : Any = None ) : nonlocal disposed try : while not disposed : value = next ( iterator ) observer . on_next ( value ) except StopIteration : observer . on_completed ( ) except Exception as error : observer . on_error ( error ) def dispose ( ) : nonlocal disposed disposed = True disposable = AnonymousDisposable ( dispose ) return CompositeDisposable ( scheduler . schedule ( action ) , disposable ) return AnonymousObservable ( subscribe )
Converts an iterable to an observable sequence.
Converts an iterable to an observable sequence .
"""Converts an iterable to an observable sequence.

    1 - res = from_iterable([1,2,3])

    Keyword arguments:
    iterable - An python iterable

    Returns the observable sequence whose elements are pulled from the
    given iterable sequence.
    """ # pylint: disable=W0703
iterable
Iterable