U vi @szddlmZmZmZmZddlmZmZddlm Z m Z m Z m Z ddl mZedZeeeeedddZdgZd S) )AnyIterableOptionalTypeVar) Observableabc)CompositeDisposable DisposableSerialDisposableSingleAssignmentDisposable)CurrentThreadScheduler_T)sourcesreturncs6t|dtjtttjtjdfdd }t|S)aContinues an observable sequence that is terminated by an exception with the next observable sequence. Examples: >>> res = catch([xs, ys, zs]) >>> res = reactivex.catch(src for src in [xs, ys, zs]) Args: sources: an Iterable of observables. Thus a generator is accepted. Returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. N)observer scheduler_rc sxp tttdddtjtddf dd _ddfdd }tt |S) NF) schedulerstaterc stddfdd }r"dSz t}WnVtk rZrNnYnPtk r}z|W5d}~XYn&Xt}|_|jj|jd|_dS)N)exnrcs|_dS)N)schedule disposable)r) _scheduleraction cancelablelast_exceptionK/opt/alt/python38/lib/python3.8/site-packages/reactivex/observable/catch.pyon_error-szIcatch_with_iterable_..subscribe..action..on_error)r) Exceptionnext StopIterationrZ on_completedr r subscribeZon_next)rrrcurrentexd) rrr is_disposedrrrsources_ subscriptionrrr,s&   z7catch_with_iterable_..subscribe..action)rcsddS)NTrr)r%rrdisposeJsz8catch_with_iterable_..subscribe..dispose)N) r Z singletonr r SchedulerBaserrrrr )rrr(r&)rrrr%rrrr'rr!"s * z'catch_with_iterable_..subscribe)N)iterrZ ObserverBaser rr)ZDisposableBaser)rr!rr*rcatch_with_iterable_s.r,N)typingrrrrZ reactivexrrZreactivex.disposablerr r r Zreactivex.schedulerr r r,__all__rrrrs  D