U
vi @ s d dl mZmZmZmZ d dlmZmZ d dlm Z m
Z
edZde e eeee gee f dddZ
d
e
e eeee gee f dd d
Zdd
gZdS ) )AnyCallableOptionalTypeVar)
Observableabc) PredicatePredicateIndexed_TF) predicate inclusivereturnc s" t t t t d fdd}|S )Nsourcer
c s2 dt jt tt j t jd fdd
}t|S )a Returns elements from an observable sequence as long as a
specified condition is true.
Example:
>>> take_while(source)
Args:
source: The source observable to take from.
Returns:
An observable sequence that contains the elements from the
input sequence that occur before the element at which the
test no longer passes.
Nobserver schedulerr
c s4 dt d fdd}j| j j|dS )NT)valuec s j b sW 5 Q R d S z| W n< tk
rb } z| W Y W 5 Q R d S d }~X Y nX W 5 Q R X r~| n r| d S )Nlock Exceptionon_erroron_nexton_completedr Zexn)r r r runningr O/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_takewhile.pyr " s
,
zCtake_while_.