rx/core/observablebase.py
def last_or_default(self, predicate=None, default_value=None) -> 'ObservableBase':
        """Return last or default element.

        Returns the last element of an observable sequence that
        satisfies the condition in the predicate, or a default value if
        no such element exists.

        Examples:
            >>> res = source.last_or_default()
            >>> res = source.last_or_default(lambda x: x > 3)
            >>> res = source.last_or_default(lambda x: x > 3, 0)
            >>> res = source.last_or_default(None, 0)

        Args:
            predicate: A predicate function to evaluate for elements in
                the source sequence.
            default_value: The default value if no such element exists.
                If not specified, defaults to None.

        Returns:
            Observable sequence containing the last element in the
            observable sequence that satisfies the condition in the
            predicate, or a default value if no such element exists.
        """
        from ..operators.observable.lastordefault import last_or_default
        return last_or_default(self, predicate, default_value)
Return last or default element.

        Returns the last element of an observable sequence that
        satisfies the condition in the predicate, or a default value if
        no such element exists.

        Examples:
            >>> res = source.last_or_default()
            >>> res = source.last_or_default(lambda x: x > 3)
            >>> res = source.last_or_default(lambda x: x > 3, 0)
            >>> res = source.last_or_default(None, 0)

        Args:
            predicate: A predicate function to evaluate for elements in
                the source sequence.
            default_value: The default value if no such element exists.
                If not specified, defaults to None.

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

        Returns the last element of an observable sequence that
        satisfies the condition in the predicate, or a default value if
        no such element exists.

        Examples:
            >>> res = source.last_or_default()
            >>> res = source.last_or_default(lambda x: x > 3)
            >>> res = source.last_or_default(lambda x: x > 3, 0)
            >>> res = source.last_or_default(None, 0)

        Args:
            predicate: A predicate function to evaluate for elements in
                the source sequence.
            default_value: The default value if no such element exists.
                If not specified, defaults to None.

        Returns:
            Observable sequence containing the last element in the
            observable sequence that satisfies the condition in the
            predicate, or a default value if no such element exists.
        """
Observable sequence containing the last element in the
observable sequence that satisfies the condition in the
predicate, or a default value if no such element exists.
Observable sequence containing the last element in the observable sequence that satisfies the condition in the predicate or a default value if no such element exists .
self
predicate
A predicate function to evaluate for elements in
the source sequence.
A predicate function to evaluate for elements in the source sequence .
default_value
The default value if no such element exists.
If not specified, defaults to None.
The default value if no such element exists . If not specified defaults to None .
examples
>>> res = source.last_or_default()
>>> res = source.last_or_default(lambda x: x > 3)
>>> res = source.last_or_default(lambda x: x > 3, 0)
>>> res = source.last_or_default(None, 0)
>>> res = source . last_or_default () >>> res = source . last_or_default ( lambda x : x > 3 ) >>> res = source . last_or_default ( lambda x : x > 3 0 ) >>> res = source . last_or_default ( None 0 )