Use iterators like Java streams.
Project description
Note: This package is in the dangerous land of
0.x.y
versions and may be subject to breaking changes with minor version increments.
nr.stream
Provides a Stream
class which allows chained operations on a stream of values.
Example
from nr.stream import Stream
values = [3, 6, 4, 7, 1, 2, 5]
assert list(Stream(values).chunks(values, 3, fill=0).map(sum)) == [13, 10, 5]
Copyright © 2020 Niklas Rosenstein
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nr.stream-0.1.0.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for nr.stream-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59e7ab194d69245d0fc095527a2118880d4bcd31c33bf3f6e53ec4e6582f98f7 |
|
MD5 | 1ed54ff167a7681567bec784bd4630c9 |
|
BLAKE2b-256 | f048c74e64c6a9e55411dac9b6a4b8b1c39570a7fd2a2f5e1d595cd13843c87d |