October 2018
Intermediate to advanced
420 pages
10h 26m
English
The empty operator returns an observable that completes immediately without sending any item:

The prototype of the empty operator is the following one:
Observable.empty(scheduler=None)
The empty operator can be used in the following way:
empty = Observable.empty()empty.subscribe( on_next=lambda i: print("item: {}".format(i)), on_error=lambda e: print("error: {}".format(e)), on_completed=lambda: print("completed"))
The empty operator is useful mainly for testing and for stubbing:
Read now
Unlock full access