File: _concat.py

package info (click to toggle)
python-rx 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,204 kB
  • sloc: python: 39,525; javascript: 77; makefile: 24
file content (26 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from typing import Callable, TypeVar

import reactivex
from reactivex import Observable

_T = TypeVar("_T")


def concat_(*sources: Observable[_T]) -> Callable[[Observable[_T]], Observable[_T]]:
    def concat(source: Observable[_T]) -> Observable[_T]:
        """Concatenates all the observable sequences.

        Examples:
            >>> op = concat(xs, ys, zs)

        Returns:
            An operator function that takes one or more observable sources and
            returns an observable sequence that contains the elements of
            each given sequence, in sequential order.
        """
        return reactivex.concat(source, *sources)

    return concat


__all__ = ["concat_"]