U vi/@sddlZddlmZddlmZmZmZddlZddlmZddl m Z ddl m Z edZ e ee eee gee fdd d Zd gZdS) N)Future)CallableTypeVarUnion) Observable)infinite) Predicate_T) conditionreturncs(tttdfttdfdd }|S)Nz Future[_T])sourcer cs@t|trt|n|tfddtD}t|S)aIRepeats source as long as condition holds emulating a while loop. Args: source: The observable sequence that will be run if the condition function returns true. Returns: An observable sequence which is repeated as long as the condition holds. c3s|] }VqdS)N).0_Zobsr M/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_whiledo.py sz.while_do_..while_do..) isinstancer reactivexZ from_future itertools takewhilerZconcat_with_iterable)r itr rrwhile_dos  zwhile_do_..while_do)rrr )r rr rr while_do_ s$r)rasynciortypingrrrrrZreactivex.internal.utilsrZreactivex.typingrr r__all__r r r rs