Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

itertools. But picklable.

Project Description

A reimplementation of the Python standard library’s itertools, in Python, using picklable iterator objects. Intended to be Python 2.7 and 3.4+ compatible.

Why?

  • Because the standard library pickle module (nor the excellent dill package) can’t serialize all of the itertools iterators.
  • Because there are lots of instances where these things in itertools would simplify code, but can’t be used because serializability must be maintained. Primarily blocks is our first consumer.

Philosophy

  • This should be a drop-in replacement. Pretty self-explanatory. Test against the standard library itertools or builtin implementation to verify behaviour matches.
  • Handle built-in types gracefully if possible. List iterators, etc. are not picklable on Python 2.x, so we provide an alternative implementation. File iterators are handled transparently as well. set and dict iterators demand a bit more thought.
  • Premature optimization is the root of all evil. These things are implemented in Python, so speed is obviously not our primary concern. Several of the more advanced iterators are constructed by chaining simpler iterators together, which is not the most efficient thing to do but simplifies the code a lot. If it turns out that speed (or a shallower object graph) is necessary or desirable, these can always be reimplemented. Pull requests to this effect are welcome.
Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
picklable-itertools-0.0.1.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source Feb 13, 2015

Supported By

WebFaction WebFaction Technical Writing 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 Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting