Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Itertools shim with recipes and extras

Project Description

A drop-in replacement for itertools including the recipes from the itertools document page(including tests) and some extras.

The file adds a couple of useful function along with an alternate pairwise function to avoid over-loading with tee, an alternate partition function to return lists instead of generators as tee would have also generated the overhead and the predicate would have run twice for each element, and an alternate powerset function providing a reverse argument.

  • multi-map converts an itertable into a multi-map(dict of lists)
  • split splits an iterable into segments similar to string.split
  • chunk chunks data into segments of a limited size - similar to grouper
  • divide evenly divides elements into a fixed number of chunks
  • divide_sizes determine the sizes of chunks if a number of elements were evenly divided

All of itertools and the functions in are pulled in on __init__.

The recipes are included in the file and are pulled in on __init__ with the exception of the alternates provided by

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(25.3 kB) Copy SHA256 Hash SHA256
Wheel py3 Jun 16, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting