Skip to main content

rust like iterators for python

Project description

Better iterators for python (all typed)

Examples

simple

## create iterator for even integers squared
even_integers = Iter[int](range(100)) \
    .filter(lambda x: x % 2 == 0) \
    .map(lambda x: x ** 2)

## to evaluate into a list use
basic_list = even_integers.collect(list)
smart_list = even_integers.to_list()

## The smart list will allow the usage of iterator notation again by
times2_iter = smart_list.iter() \
    .map(lambda x: x * 2)

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

rustlite-0.1.4.tar.gz (2.5 kB view hashes)

Uploaded Source

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