Ledenel / itertools-len

Wrapper around the stdlib’ itertools with len() support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

itertools-len

pkg docs ci cov

Have you ever been annoyed that the length information of itertools have not been preserved?

This module faithfully wraps every one of them (together with map) where len can be derived:

>>> from itertools_len import chain, product
>>> len(chain('abc', [1, 2]))
5
>>> len(product('abc', [1, 2]))
6

About

Wrapper around the stdlib’ itertools with len() support

License:GNU General Public License v3.0


Languages

Language:Python 100.0%