rx/core/observablebase.py
def single(self, predicate: Predicate = None) -> 'ObservableBase':
        """The single operator.

        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.

        Examples:
            >>> res = source.single()
            >>> res = source.single(lambda x: x == 42)

        Args:
            predicate: 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.
        """
        from ..operators.observable.single import single
        return single(self, predicate)
The single operator.

        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.

        Examples:
            >>> res = source.single()
            >>> res = source.single(lambda x: x == 42)

        Args:
            predicate: 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.
        
The single operator.
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.
The single operator . 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 .
def single(self, predicate: Predicate = None) -> 'ObservableBase':
        from ..operators.observable.single import single
        return single(self, predicate)
def single ( self , predicate : Predicate = None ) -> 'ObservableBase' : from . . operators . observable . single import single return single ( self , predicate )
The single operator.
The single operator .
"""The single operator.

        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.

        Examples:
            >>> res = source.single()
            >>> res = source.single(lambda x: x == 42)

        Args:
            predicate: 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.
        """
An observable sequence containing the single element in the
observable sequence that satisfies the condition in the
predicate.
An observable sequence containing the single element in the observable sequence that satisfies the condition in the predicate .
self
predicate
Predicate
A predicate function to evaluate for elements in
the source sequence.
A predicate function to evaluate for elements in the source sequence .
examples
>>> res = source.single()
>>> res = source.single(lambda x: x == 42)
>>> res = source . single () >>> res = source . single ( lambda x : x == 42 )