rx/core/observablebase.py
def first_or_default(self, predicate=None, default_value=None) -> 'ObservableBase':
        """Returns the first element of an observable sequence that
        satisfies the condition in the predicate, or a default value if
        no such element exists.

        Example:
        res = source.first_or_default()
        res = source.first_or_default(lambda x: x > 3)
        res = source.first_or_default(lambda x: x > 3, 0)
        res = source.first_or_default(null, 0)

        Keyword arguments:
        predicate -- [optional] A predicate function to evaluate for
            elements in the source sequence.
        default_value -- [Optional] The default value if no such element
            exists.  If not specified, defaults to None.

        Returns {Observable} Sequence containing the first element in
        the observable sequence that satisfies the condition in the
        predicate, or a default value if no such element exists.
        """
        from ..operators.observable.firstordefault import first_or_default
        return first_or_default(self, predicate, default_value)
Returns the first element of an observable sequence that
        satisfies the condition in the predicate, or a default value if
        no such element exists.

        Example:
        res = source.first_or_default()
        res = source.first_or_default(lambda x: x > 3)
        res = source.first_or_default(lambda x: x > 3, 0)
        res = source.first_or_default(null, 0)

        Keyword arguments:
        predicate -- [optional] A predicate function to evaluate for
            elements in the source sequence.
        default_value -- [Optional] The default value if no such element
            exists.  If not specified, defaults to None.

        Returns {Observable} Sequence containing the first element in
        the observable sequence that satisfies the condition in the
        predicate, or a default value if no such element exists.
        
Returns the first element of an observable sequence that
satisfies the condition in the predicate, or a default value if
no such element exists.
Returns the first element of an observable sequence that satisfies the condition in the predicate or a default value if no such element exists .
def first_or_default(self, predicate=None, default_value=None) -> 'ObservableBase':
        from ..operators.observable.firstordefault import first_or_default
        return first_or_default(self, predicate, default_value)
def first_or_default ( self , predicate = None , default_value = None ) -> 'ObservableBase' : from . . operators . observable . firstordefault import first_or_default return first_or_default ( self , predicate , default_value )
Returns the first element of an observable sequence that
satisfies the condition in the predicate, or a default value if
no such element exists.
Returns the first element of an observable sequence that satisfies the condition in the predicate or a default value if no such element exists .
"""Returns the first element of an observable sequence that
        satisfies the condition in the predicate, or a default value if
        no such element exists.

        Example:
        res = source.first_or_default()
        res = source.first_or_default(lambda x: x > 3)
        res = source.first_or_default(lambda x: x > 3, 0)
        res = source.first_or_default(null, 0)

        Keyword arguments:
        predicate -- [optional] A predicate function to evaluate for
            elements in the source sequence.
        default_value -- [Optional] The default value if no such element
            exists.  If not specified, defaults to None.

        Returns {Observable} Sequence containing the first element in
        the observable sequence that satisfies the condition in the
        predicate, or a default value if no such element exists.
        """
self
predicate
default_value
examples
None