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 the Stream
class with useful helper methods. All methods are both instance and class
methods at the same time.
Example
from nr.stream import Stream
values = [3, 6, 4, 7, 1, 2, 5]
assert list(Stream.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.0.5.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for nr.stream-0.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf418a4de3cedb8622286d2baca6007a153c780af48362d1f2ef2c1993525615 |
|
MD5 | 62e29edf39d3973a2ca366628aff9881 |
|
BLAKE2b-256 | 8aac817ffb8a09ae0dded57a4140665ca2a8fd3fed1be8ac77ba88e202f42bf7 |