{ "info": { "author": "Stephan Hoyer", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Utilities" ], "description": "lazyseq: a lazily evaluated sequence type for Python\n----------------------------------------------------\n\n|travis|\n\n**lazyseq** is a simple library implementing a single class, ``LazySeq``, which\nprovides a lazily evaluated sequence that can be used like an immutable list.\nYou can think of it as a Pythonic version of Clojure's\n`Seq `_. The main use of ``LazySeq`` is for\nwrapping generators or\n`generator expressions `_ to make\nthem persistent, but still lazy.\n\n``LazySeq`` implements Python\u2019s sequence interface, and thus has the methods\n``__getitem__``, ``__len__``, ``__contains__``, ``__iter__``, ``__reversed__``,\n``index``, and ``count``.\n\nGetting an item from a LazySeq is equivalent to getting an items from the\nprovided iterable as a list. However, only the necessary elements of the\niterable are evaluated (all those up to the maximum requested element), and all\nevaluated elements are cached on the ``LazySeq`` so it can be iterated over\nagain. Note that some operations like ``len(seq)`` will by necessity iterate\nover (and thus cache) the entire iterable.\n\nTo use LazySeq, just call ``LazySeq`` on any Python iterable:\n\n.. code:: python\n\n >>> from lazyseq import LazySeq\n >>> seq = LazySeq(x ** 2 for x in range(5))\n >>> seq\n LazySeq([...])\n >>> seq[:3]\n [0, 1, 4]\n >>> seq\n LazySeq([0, 1, 4, ...])\n >>> list(seq)\n [0, 1, 4, 9, 16]\n >>> seq\n LazySeq([0, 1, 4, 9, 16])\n\n.. |travis| image:: https://travis-ci.org/shoyer/lazyseq.png\n :target: https://travis-ci.org/shoyer/lazyseq\n :alt: travis-ci build status", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/shoyer/lazyseq", "keywords": "lazy seq sequence", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "lazyseq", "package_url": "https://pypi.org/project/lazyseq/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lazyseq/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/shoyer/lazyseq" }, "release_url": "https://pypi.org/project/lazyseq/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "a lazily evaluated sequence type for Python", "version": "0.1.1" }, "last_serial": 1024627, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9e7ff9fb5d157c0dd6455212ae5e8521", "sha256": "bcfc5875011502daee1f6d35eafc7c1af602340241d4bfeebdb12b18ebb3f66c" }, "downloads": -1, "filename": "lazyseq-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9e7ff9fb5d157c0dd6455212ae5e8521", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2429, "upload_time": "2014-03-10T03:20:56", "url": "https://files.pythonhosted.org/packages/c7/3c/4101cfe1f8b1da76a6af7e1bda9a6e0a3590b2b180578a16e3a835df83a4/lazyseq-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "be39fad9f64110869cc7e071ee484d6a", "sha256": "6b97c3ba0409bce295963aceedb75b4f98021d65227c37f181b841e405b6903f" }, "downloads": -1, "filename": "lazyseq-0.1.1.tar.gz", "has_sig": false, "md5_digest": "be39fad9f64110869cc7e071ee484d6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2513, "upload_time": "2014-03-10T08:37:57", "url": "https://files.pythonhosted.org/packages/28/68/06f8d1dfb10c8ebde82cda785b337efe4b3b103d4e1855de98a1a55a2d92/lazyseq-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be39fad9f64110869cc7e071ee484d6a", "sha256": "6b97c3ba0409bce295963aceedb75b4f98021d65227c37f181b841e405b6903f" }, "downloads": -1, "filename": "lazyseq-0.1.1.tar.gz", "has_sig": false, "md5_digest": "be39fad9f64110869cc7e071ee484d6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2513, "upload_time": "2014-03-10T08:37:57", "url": "https://files.pythonhosted.org/packages/28/68/06f8d1dfb10c8ebde82cda785b337efe4b3b103d4e1855de98a1a55a2d92/lazyseq-0.1.1.tar.gz" } ] }