rx/core/observablebase.py
def default_if_empty(self, default_value=None) -> 'ObservableBase':
        """Returns the elements of the specified sequence or the
        specified value in a singleton sequence if the sequence is
        empty.

        Examples:
            >>> obs = xs.default_if_empty()
            >>> obs = xs.default_if_empty(False)

        Args:
            default_value: The value to return if the sequence is empty.
                If not provided, this defaults to None.

        Returns:
            An observable sequence that contains the specified default
            value if the source is empty otherwise, the elements of the
            source itself.
        """
        from ..operators.observable.defaultifempty import default_if_empty
        return default_if_empty(self, default_value)
Returns the elements of the specified sequence or the
        specified value in a singleton sequence if the sequence is
        empty.

        Examples:
            >>> obs = xs.default_if_empty()
            >>> obs = xs.default_if_empty(False)

        Args:
            default_value: The value to return if the sequence is empty.
                If not provided, this defaults to None.

        Returns:
            An observable sequence that contains the specified default
            value if the source is empty otherwise, the elements of the
            source itself.
        
Returns the elements of the specified sequence or the
specified value in a singleton sequence if the sequence is
empty.
Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty .
def default_if_empty(self, default_value=None) -> 'ObservableBase':
        from ..operators.observable.defaultifempty import default_if_empty
        return default_if_empty(self, default_value)
def default_if_empty ( self , default_value = None ) -> 'ObservableBase' : from . . operators . observable . defaultifempty import default_if_empty return default_if_empty ( self , default_value )
Returns the elements of the specified sequence or the
specified value in a singleton sequence if the sequence is
empty.
Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty .
"""Returns the elements of the specified sequence or the
        specified value in a singleton sequence if the sequence is
        empty.

        Examples:
            >>> obs = xs.default_if_empty()
            >>> obs = xs.default_if_empty(False)

        Args:
            default_value: The value to return if the sequence is empty.
                If not provided, this defaults to None.

        Returns:
            An observable sequence that contains the specified default
            value if the source is empty otherwise, the elements of the
            source itself.
        """
An observable sequence that contains the specified default
value if the source is empty otherwise, the elements of the
source itself.
An observable sequence that contains the specified default value if the source is empty otherwise the elements of the source itself .
self
default_value
The value to return if the sequence is empty.
If not provided, this defaults to None.
The value to return if the sequence is empty . If not provided this defaults to None .
examples
>>> obs = xs.default_if_empty()
>>> obs = xs.default_if_empty(False)
>>> obs = xs . default_if_empty () >>> obs = xs . default_if_empty ( False )