rx/core/observablebase.py
def sum(self, key_mapper: Mapper = None) -> 'ObservableBase':
        """Computes the sum of a sequence of values that are obtained by
        invoking an optional transform function on each element of the
        input sequence, else if not specified computes the sum on each
        item in the sequence.

        Examples:
            >>> res = source.sum()
            >>> res = source.sum(lambda x: x.value)

        Args:
            key_mapper: A transform function to apply to each element.

        Returns:
            An observable sequence containing a single element with
            the sum of the values in the source sequence.
        """
        from ..operators.observable.sum import sum as _sum
        return _sum(self, key_mapper)
Computes the sum of a sequence of values that are obtained by
        invoking an optional transform function on each element of the
        input sequence, else if not specified computes the sum on each
        item in the sequence.

        Examples:
            >>> res = source.sum()
            >>> res = source.sum(lambda x: x.value)

        Args:
            key_mapper: A transform function to apply to each element.

        Returns:
            An observable sequence containing a single element with
            the sum of the values in the source sequence.
        
Computes the sum of a sequence of values that are obtained by
invoking an optional transform function on each element of the
input sequence, else if not specified computes the sum on each
item in the sequence.
Computes the sum of a sequence of values that are obtained by invoking an optional transform function on each element of the input sequence else if not specified computes the sum on each item in the sequence .
def sum(self, key_mapper: Mapper = None) -> 'ObservableBase':
        from ..operators.observable.sum import sum as _sum
        return _sum(self, key_mapper)
def sum ( self , key_mapper : Mapper = None ) -> 'ObservableBase' : from . . operators . observable . sum import sum as _sum return _sum ( self , key_mapper )
Computes the sum of a sequence of values that are obtained by
invoking an optional transform function on each element of the
input sequence, else if not specified computes the sum on each
item in the sequence.
Computes the sum of a sequence of values that are obtained by invoking an optional transform function on each element of the input sequence else if not specified computes the sum on each item in the sequence .
"""Computes the sum of a sequence of values that are obtained by
        invoking an optional transform function on each element of the
        input sequence, else if not specified computes the sum on each
        item in the sequence.

        Examples:
            >>> res = source.sum()
            >>> res = source.sum(lambda x: x.value)

        Args:
            key_mapper: A transform function to apply to each element.

        Returns:
            An observable sequence containing a single element with
            the sum of the values in the source sequence.
        """
An observable sequence containing a single element with
the sum of the values in the source sequence.
An observable sequence containing a single element with the sum of the values in the source sequence .
self
key_mapper
Mapper
A transform function to apply to each element.
A transform function to apply to each element .
examples
>>> res = source.sum()
>>> res = source.sum(lambda x: x.value)
>>> res = source . sum () >>> res = source . sum ( lambda x : x . value )