From 624260adbf5b009793d0da9031773f6079abf765 Mon Sep 17 00:00:00 2001 From: Luc Morin Date: Sat, 20 Aug 2022 20:46:13 -0400 Subject: [PATCH] Update get_started.rst -Fixed a typo for proper code markdown. -The "Custom operator" section gives an error on Python 3.10.6 (Windows 10 64 bits): TypeError: Observable.subscribe() takes from 1 to 4 positional arguments but 5 were given Apparently, the call to "source.subscribe(...)" on line 194, requires that the "scheduler" parameter be explicitly named. I'm a beginner with Python as a language, PyCharm as my IDE, and using RxPy, so I might be doing things wrong, but when I name the scheduler parameter, things work as expected. --- docs/get_started.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/get_started.rst b/docs/get_started.rst index 146dadae7..7af47dc62 100644 --- a/docs/get_started.rst +++ b/docs/get_started.rst @@ -181,7 +181,7 @@ It is also possible to create an operator that is not a composition of other operators. This allows to fully control the subscription logic and items emissions: - .. code:: python +.. code:: python import reactivex @@ -195,7 +195,7 @@ emissions: on_next, observer.on_error, observer.on_completed, - scheduler) + scheduler=scheduler) return reactivex.create(subscribe) return _lowercase