Rust-like iterator for Python
Project description
ziper
Rust-like iterator for Python
Install
pip install ziper
Usage
from ziper import Iter
xs = ['1', '2', 'a', '3', '4', 'b', 'c']
ys = [6, 7, 8, 9]
evens: list = (
Iter(xs)
.filter(lambda x: x.isdecimal())
.map(int)
.chain(ys)
.filter(lambda x: x % 2 == 0)
.collect(list)
)
assert evens == [2, 4, 6, 8]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ziper-0.1.5.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ziper-0.1.5-py3-none-any.whl
(6.8 kB
view details)
File details
Details for the file ziper-0.1.5.tar.gz.
File metadata
- Download URL: ziper-0.1.5.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.11.3 Darwin/22.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4afa55553a0de0d95bb5356fcc3794989d93d1883d9ea7bff119ec27ed08485
|
|
| MD5 |
68deffbb38832d7c3a0e3179868990a9
|
|
| BLAKE2b-256 |
7e9273f92731db1190989890c48ff49f163aa609e73e235bc3e9281d3c9edb2c
|
File details
Details for the file ziper-0.1.5-py3-none-any.whl.
File metadata
- Download URL: ziper-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.0 CPython/3.11.3 Darwin/22.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34b41a3efbfb9869d416750ad03ba2256b9877370a15486b8f5ee82b971ac480
|
|
| MD5 |
acc2fb9a27bd23020348c75337a1cd8a
|
|
| BLAKE2b-256 |
cdc7a371c6d217eb2b720a7082686542271e931caeda56e8ab87adc61ba0f33f
|