Skip to main content

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)

Uploaded Source

Built Distribution

ziper-0.1.5-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

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

Hashes for ziper-0.1.5.tar.gz
Algorithm Hash digest
SHA256 c4afa55553a0de0d95bb5356fcc3794989d93d1883d9ea7bff119ec27ed08485
MD5 68deffbb38832d7c3a0e3179868990a9
BLAKE2b-256 7e9273f92731db1190989890c48ff49f163aa609e73e235bc3e9281d3c9edb2c

See more details on using hashes here.

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

Hashes for ziper-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 34b41a3efbfb9869d416750ad03ba2256b9877370a15486b8f5ee82b971ac480
MD5 acc2fb9a27bd23020348c75337a1cd8a
BLAKE2b-256 cdc7a371c6d217eb2b720a7082686542271e931caeda56e8ab87adc61ba0f33f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page