U vâ’iSã@s\ddlmZmZmZmZddlmZmZedƒZe eeegeefdœdd„Z dgZ dS)é)ÚCallableÚListÚOptionalÚTypeVar)Ú ObservableÚabcÚ_T)ÚcountÚreturncs ttttdœ‡fdd„ }|S)N)Úsourcer cs0dtjtttjtjdœ‡‡fdd„ }t|ƒS)aŸReturns a specified number of contiguous elements from the end of an observable sequence. Example: >>> res = take_last(source) This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. Args: source: Number of elements to take from the end of the source sequence. Returns: An observable sequence containing the specified number of elements from the end of the source sequence. N)ÚobserverÚ schedulerr cs<g‰tddœ‡‡fdd„ }‡‡fdd„}ˆj|ˆj||dS)N)Úxr cs$ˆ |¡tˆƒˆkr ˆ d¡dS©Nr)ÚappendÚlenÚpop)r)r Úq©úN/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_takelast.pyÚon_next$s  zAtake_last_..take_last..subscribe..on_nextcs"ˆrˆ ˆ d¡¡qˆ ¡dSr)rrÚ on_completedr©r rrrr)szFtake_last_..take_last..subscribe..on_completed)r )rÚ subscribeZon_error)r r rr)r r rrrsÿz0take_last_..take_last..subscribe)N)rZ ObserverBaserrZ SchedulerBaseZDisposableBaser)r r©r )r rÚ take_last sþýztake_last_..take_last)rr)r rrrrÚ take_last_s+rN) ÚtypingrrrrZ reactivexrrrÚintrÚ__all__rrrrÚs"/