Skip to Content
Hands-On Reactive Programming with Python
book

Hands-On Reactive Programming with Python

by Romain Picard
October 2018
Intermediate to advanced
420 pages
10h 26m
English
Packt Publishing
Content preview from Hands-On Reactive Programming with Python

Be clear on hot and cold observables

Being aware of the type of each observable is of key importance. By default, observables in ReactiveX are cold. Following this convention will avoid surprises for people reading the code. Making cold observables hot only on purpose makes it obvious when reading the code. However, there are cases where an observable has to be implemented as a hot one. In such cases, make this information clear in the documentation of the observable factory.

Misusing a cold observable as a hot observable provokes the opposite effect from the "nothing happens" symptom: actions are executed multiple times instead of only once. This is also usually easy to detect, but finding the root cause can once again be more tricky. The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Programming with Design Patterns

Python Programming with Design Patterns

James W. Cooper

Publisher Resources

ISBN: 9781789138726Supplemental Content