Add switch_map operator and equivalent starred and indexed#634
Add switch_map operator and equivalent starred and indexed#634giff-h wants to merge 1 commit intoReactiveX:masterfrom
Conversation
eec49cb to
8a66310
Compare
8a66310 to
0cd0167
Compare
|
Great work! The main building blocks of Rx is the merge functions ( |
This draws from the definition in rxjs and maintains parity with the map operator and its variants
0cd0167 to
7fbbd9d
Compare
| """ | ||
| The switch_map operator. | ||
|
|
||
| Project each element of an observable sequence into a new observable. |
There was a problem hiding this comment.
| Project each element of an observable sequence into a new observable. | |
| Project each element of an observable sequence into a new observable. producing values only from the most | |
| recent observable sequence. |
| The switch_map_indexed operator. | ||
|
|
||
| Project each element of an observable sequence into a new observable | ||
| by incorporating the element's index. |
There was a problem hiding this comment.
| by incorporating the element's index. | |
| by incorporating the element's index and producing values only from the most recent | |
| observable sequence. |
| Unpack arguments grouped as tuple elements of an observable sequence | ||
| and return an observable sequence whose values are each element of | ||
| the observable returned by invoking the mapper function with star | ||
| applied on unpacked elements as positional arguments. |
There was a problem hiding this comment.
| applied on unpacked elements as positional arguments. | |
| applied on unpacked elements as positional arguments, and only producing values only from the most recent | |
| observable sequence. |
| An operator function that takes an observable source and returns | ||
| an observable sequence whose values are each element of the | ||
| observable returned by invoking the mapper function with the | ||
| unpacked elements of the source. |
There was a problem hiding this comment.
Same here: " ... producing values only from the most recent observable sequence.""" or else it looks like a flat_map.
|
@hamstap85 One thing that worries me about this PR is that the tests are derived from |
|
@dbrattli No worries at all, thanks for the feedback. What's the desired max line length in docstrings? Equal to python code max length enforced by |
|
Docstrings should follow PEP-8, i.e 72 chars per line. PS: all the current tests for |
This draws from the definition in rxjs and maintains parity with the
map operator and its variants