U vi@sddlmZmZmZddlmZmZddlmZddl m Z ddl m Z edZ d ee e eee gee fd d d Zd gZdS) )CallableOptionalTypeVar) Observablecompose) operators) Predicate)first_or_default_async__TN) predicatereturncCs |rtt|tStdS)aReturns the first element of an observable sequence that satisfies the condition in the predicate if present else the first item in the sequence. Examples: >>> res = res = first()(source) >>> res = res = first(lambda x: x > 3)(source) Args: predicate -- [Optional] A predicate function to evaluate for elements in the source sequence. Returns: A function that takes an observable source and returns an observable sequence containing the first element in the observable sequence that satisfies the condition in the predicate if provided, else the first item in the sequence. F)ropsfilterfirstr )r rK/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_first.pyfirst_ sr)N)typingrrrZ reactivexrrrrZreactivex.typingrZ_firstordefaultr r r__all__rrrrs