U vâ’isã@s~ddlmZmZmZmZddlmZmZddlmZ ddl m Z edƒZ d ee e eee gee fdœdd „Z d gZdS) é)ÚCallableÚOptionalÚTypeVarÚcast)Ú ObservableÚcompose)Ú operators)Ú PredicateÚ_TN)Ú predicateÚreturncCs>|rtt |¡t ¡ƒSttttgttft d¡ƒSdS)a?Returns the only element of an observable sequence that satisfies the condition in the optional predicate, and reports an exception if there is not exactly one element in the observable sequence. Example: >>> res = single() >>> res = single(lambda x: x == 42) Args: predicate -- [Optional] A predicate function to evaluate for elements in the source sequence. Returns: An observable sequence containing the single element in the observable sequence that satisfies the condition in the predicate. FN) rÚopsÚfilterZsinglerrrr Zsingle_or_default_async)r ©rúL/opt/alt/python38/lib/python3.8/site-packages/reactivex/operators/_single.pyÚsingle_ s þr)N)ÚtypingrrrrZ reactivexrrrr Zreactivex.typingr r rÚ__all__rrrrÚs  ÿ þ