U vi@sfddlmZmZmZmZmZddlmZmZedZ eee geee e ffdddZ dgZ dS))CallableOptionalTupleTypeVarcast) Observableabc_T)returncCs$ttttttfddd}|S)N)sourcer cs6dtjtttfttjtjdfdd }t|S)a3Partially applied pairwise operator. Returns a new observable that triggers on the second and subsequent triggerings of the input observable. The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair. The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs. Returns: An observable that triggers on successive pairs of observations from the input observable as an array. N)observer schedulerr cs:dttdtddfdd }|jjS)NF)xr c s>d}jr|f}nd|W5QRX|r:|dS)NT)lockon_next)rpair) has_previousr previousr N/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_pairwise.pyrs z?pairwise_..pairwise..subscribe..on_next)rr subscribeZon_errorZ on_completed)r r rr )rr rrrs z.pairwise_..pairwise..subscribe)N)rZ ObserverBaserr rZ SchedulerBaseZDisposableBaser)r rrrrpairwise szpairwise_..pairwise)rr r)rrrr pairwise_s )rN) typingrrrrrZ reactivexrrr r__all__rrrrs(-