This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Constructs a generator over the iterable yielding look-ahead (and/or “look-behind”) tuples. One tuple will be generated for each element value accessible from the iterator, containing that element and the number of elements specified just prior to and immediately after. When no such element exists, the None is used instead.

If one were to think of iterator as a list, this is would be similar to appending [None]*lookahead and prepending [None]*lookbehind, then iterating over and returning a sliding window of length lookbehind+1+ lookahead (except of course that instead of generating the such a list, this implementation generates (and caches) lookahead values only as needed).

lookahead() may be called with 1, 2, or 3 parameters:

lookahead(iterable)
Defaults to lookahead=1, lookbehind=0
lookahead(iterable, lookahead)
Defaults to lookbehind=0
lookahead(iterable, lookbehind, lookahead)
Notice that lookahead is now the 3rd parameter!

Example semantics:

lookahead(iterable):
yield (item, next)
lookahead(iterable, 2):
yield (item, next, next+1)
lookahead(iterable, 1, 2):
yield (prev, item, next, next+1)
lookahead(iterable, p, n):
yeild (prev, …, prev+p-1, item, next, …, next+n-1)
Release History

Release History

1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
lookahead-1.0.tar.gz (2.4 kB) Copy SHA256 Checksum SHA256 Source Sep 12, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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