U
vi+* @ s^ d dl mZmZmZmZmZ d dlmZmZm Z d dl m
Z
edZdee je ee j
ee j eee gee f dddZeje eee gee f d d
dZee e je ee dd
dZee e jdddZee e jdddZee e jdddZee e jdddZe jeee gee f dddZddddddddgZdS ) )AnyCallableListOptionalTypeVar)
Observableabctyping)CompositeDisposable_TN)on_nexton_erroron_completedreturnc s$ t t t t d fdd}|S )Nsourcer c s4 dt jt tt j t jd fdd
}t|S )a Invokes an action for each element in the observable
sequence and invokes an action on graceful or exceptional
termination of the observable sequence. This method can be used
for debugging, logging, etc. of query behavior by intercepting
the message stream to run arbitrary actions for messages on the
pipeline.
Examples:
>>> do_action(send)(observable)
>>> do_action(on_next, on_error)(observable)
>>> do_action(on_next, on_error, on_completed)(observable)
Args:
on_next: [Optional] Action to invoke for each element in
the observable sequence.
on_error: [Optional] Action to invoke on exceptional
termination of the observable sequence.
on_completed: [Optional] Action to invoke on graceful
termination of the observable sequence.
Returns:
An observable source sequence with the side-effecting
behavior applied.
Nobserver schedulerr c sR t d d fdd}td d fdd}d d fdd }j||||d
S )N)xr c
sX s | nDz| W n, tk
rH } z | W 5 d }~X Y nX | d S Nr Exceptionr
)r e)r r H/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_do.py_on_next, s zBdo_action_.