I feel like I might be missing something very obvious here, but anyway...
When using RxPY, is there an equivalent of the C# RX System.Reactive.Unit
type for calling the on_next
function with no arguments?
from rx import Observable
source = Observable.return_value(???)
source.subscribe(on_next=lambda: print("on_next called"))
If anyone is curious why I might want to do this, it's because I want the start function in the code below to be called without the x
argument
def on_start(func):
def func_wrapper():
Observable.return("").subscribe(func)
return func_wrapper
@on_start
def start(x):
print(x)
start()