U
vi @ s` d dl mZmZmZmZ d dlmZmZ edZe eee geee f dddZ
dgZdS ) )CallableListOptionalTypeVar)
Observableabc_T)countreturnc s$ t t t tt d fdd}|S )N)sourcer
c s4 dt jtt tt j t jd fdd
}t|S )a Returns an array with the 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: Source observable to take elements from.
Returns:
An observable sequence containing a single list with the
specified number of elements from the end of the source
sequence.
N)observer schedulerr
c sD g t d dfdd}d d fdd}j| j||dS )N)xr
c s6 j & | t kr(d W 5 Q R X d S )Nr )lockappendlenpop)r )r qr T/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_takelastbuffer.pyon_next$ s
zOtake_last_buffer_.