U vâ’iVã@sxddlmZmZmZddlmZmZmZddlmZd ededfeej eefegeefdœdd „Z d gZ dS) é)ÚAnyÚCallableÚOptional)Ú ObservableÚabcÚtyping)Ú DisposableN.).N)ÚfuncÚmapperÚreturncstttdœ‡‡fdd„ }|S)a Converts a callback function to an observable sequence. Args: func: Function with a callback as the last argument to convert to an Observable sequence. mapper: [Optional] A mapper which takes the arguments from the callback to produce a single item to yield on next. Returns: A function, when executed with the required arguments minus the callback, produces an Observable sequence with a single value of the arguments to the callback as a list. ©Úargsr cs:t|ƒ‰dtjtttjtjdœ‡‡‡fdd„ }t|ƒS)N)ÚobserverÚ schedulerr cs.tddœ‡‡fdd„ }ˆ |¡ˆˆŽtƒS)Nr c s†t|ƒ}ˆrXz ˆ|ƒ}Wn2tk rJ}zˆ |¡WY¢dSd}~XYnXˆ |¡n*t|ƒdkrpˆj|Žn ˆ |¡ˆ ¡dS)Né)ÚlistÚ ExceptionZon_errorZon_nextÚlenZ on_completed)r ÚresultsÚerr)r r©úR/opt/alt/python38/lib/python3.8/site-packages/reactivex/observable/fromcallback.pyÚhandler s      zDfrom_callback_..function..subscribe..handler)rÚappendr)rrr)Ú argumentsr r )rrÚ subscribes z3from_callback_..function..subscribe)N)rrZ ObserverBaserrZ SchedulerBaseZDisposableBaser)r r©r r )rrÚfunctionsþýz from_callback_..function)rr)r r rrrrÚfrom_callback_sr)N) rrrrZ reactivexrrZreactivex.disposablerZMapperrÚ__all__rrrrÚs þý 4