Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flying-sheep/itertools-len
Wrapper around the stdlib’ itertools with len() support
https://github.com/flying-sheep/itertools-len
Last synced: about 1 month ago
JSON representation
Wrapper around the stdlib’ itertools with len() support
- Host: GitHub
- URL: https://github.com/flying-sheep/itertools-len
- Owner: flying-sheep
- License: gpl-3.0
- Created: 2019-09-14T19:27:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T18:31:29.000Z (about 1 month ago)
- Last Synced: 2024-11-11T19:33:11.213Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 106 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
itertools-len
=============|pkg| |docs| |ci| |cov|
.. |pkg| image:: https://img.shields.io/pypi/v/itertools-len
:target: https://pypi.org/project/itertools-len
.. |docs| image:: https://readthedocs.org/projects/itertools-len/badge/?version=latest
:target: https://itertools-len.readthedocs.io
.. |ci| image:: https://github.com/flying-sheep/itertools-len/actions/workflows/python-package.yml/badge.svg
:target: https://github.com/flying-sheep/itertools-len/actions/workflows/python-package.yml
.. |cov| image:: https://codecov.io/gh/flying-sheep/itertools-len/branch/master/graph/badge.svg
:target: https://codecov.io/gh/flying-sheep/itertools-lenHave 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