Just

See also

  • Official ReactiveX documentation: Just
classmethod Observable.just(value, scheduler=None)

Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. There is an alias called ‘just’.

example res = rx.Observable.return(42) res = rx.Observable.return(42, rx.Scheduler.timeout)

Keyword arguments: value – Single element in the resulting observable sequence. scheduler – [Optional] Scheduler to send the single element on. If

not specified, defaults to Scheduler.immediate.

Returns an observable sequence containing the single specified element.

../../_images/just.png
classmethod Observable.return_value(value, scheduler=None)

Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. There is an alias called ‘just’.

example res = rx.Observable.return(42) res = rx.Observable.return(42, rx.Scheduler.timeout)

Keyword arguments: value – Single element in the resulting observable sequence. scheduler – [Optional] Scheduler to send the single element on. If

not specified, defaults to Scheduler.immediate.

Returns an observable sequence containing the single specified element.