pyiter

PyIter is a Python package for iterative operations inspired by the Kotlin、CSharp(linq)、 TypeSrcipt and Rust . Enables strong typing and type inference for iterative operations.

Example:

>>> from pyiter import it
>>> from tqdm import tqdm
>>> text = ["hello", "world"]
>>> it(text).map(str.upper).to_list()
['HELLO', 'WORLD']
>>> # use tqdm
>>> it(range(10)).map(lambda x: str(x)).progress(lambda x: tqdm(x, total=x.len)).parallel_map(lambda x: x, max_workers=5).to_list()
 1"""
 2PyIter is a Python package for iterative operations inspired by the Kotlin、CSharp(linq)、
 3TypeSrcipt and Rust . Enables strong typing and type inference for iterative operations.
 4
 5Example:
 6>>> from pyiter import it
 7>>> from tqdm import tqdm
 8
 9>>> text = ["hello", "world"]
10>>> it(text).map(str.upper).to_list()
11['HELLO', 'WORLD']
12
13>>> # use tqdm
14>>> it(range(10)).map(lambda x: str(x)).progress(lambda x: tqdm(x, total=x.len)).parallel_map(lambda x: x, max_workers=5).to_list()
15"""
16
17from .sequence import sequence as sequence, seq as seq, it as it, Sequence as Sequence
18
19
20__ALL__ = ["sequence", "seq", "it", "Sequence"]