{ "info": { "author": "Mark Friedenbach", "author_email": "mark@friedenbach.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "lookahead\n=========\n\nConstructs a generator over the iterable yielding look-ahead (and/or\n\u201clook-behind\u201d) tuples. One tuple will be generated for each element value\naccessible from the iterator, containing that element and the number of\nelements specified just prior to and immediately after. When no such\nelement exists, the None is used instead.\n\nIf one were to think of iterator as a list, this is would be similar to\nappending `[None]*lookahead` and prepending `[None]*lookbehind`, then\niterating over and returning a sliding window of length\n`lookbehind+1+ lookahead` (except of course that instead of generating\nthe such a list, this implementation generates (and caches) lookahead\nvalues only as needed).\n\nlookahead() may be called with 1, 2, or 3 parameters:\n\n lookahead(iterable)\n Defaults to lookahead=1, lookbehind=0\n lookahead(iterable, lookahead)\n Defaults to lookbehind=0\n lookahead(iterable, lookbehind, lookahead)\n Notice that lookahead is now the 3rd parameter!\n\nExample semantics:\n\n lookahead(iterable):\n yield (item, next)\n lookahead(iterable, 2):\n yield (item, next, next+1)\n lookahead(iterable, 1, 2):\n yield (prev, item, next, next+1)\n lookahead(iterable, p, n):\n yeild (prev, ..., prev+p-1, item, next, ..., next+n-1)\n", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/packages/source/l/lookahead/lookahead-1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/maaku/lookahead/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "lookahead", "package_url": "https://pypi.org/project/lookahead/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lookahead/", "project_urls": { "Download": "http://pypi.python.org/packages/source/l/lookahead/lookahead-1.0.tar.gz", "Homepage": "http://github.com/maaku/lookahead/" }, "release_url": "https://pypi.org/project/lookahead/1.0/", "requires_dist": null, "requires_python": null, "summary": "Provides a utility for constructing generators out of an iterable that yield look-ahead (and/or \u201clook-behind\u201d) tuples.", "version": "1.0" }, "last_serial": 864307, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "933691003989e2b5cabb9bbe762954f7", "sha256": "a5e5ad434252db047147253f68a2c79e3434eb640bed43cf22dcf7e8de49e7c7" }, "downloads": -1, "filename": "lookahead-1.0.tar.gz", "has_sig": true, "md5_digest": "933691003989e2b5cabb9bbe762954f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2424, "upload_time": "2013-09-12T22:41:31", "url": "https://files.pythonhosted.org/packages/2d/5c/13000c7e4deb6fd2e288501a9892d2a13015d06fdac319649931424f9ae2/lookahead-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "933691003989e2b5cabb9bbe762954f7", "sha256": "a5e5ad434252db047147253f68a2c79e3434eb640bed43cf22dcf7e8de49e7c7" }, "downloads": -1, "filename": "lookahead-1.0.tar.gz", "has_sig": true, "md5_digest": "933691003989e2b5cabb9bbe762954f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2424, "upload_time": "2013-09-12T22:41:31", "url": "https://files.pythonhosted.org/packages/2d/5c/13000c7e4deb6fd2e288501a9892d2a13015d06fdac319649931424f9ae2/lookahead-1.0.tar.gz" } ] }