{ "info": { "author": "Igor Derkach", "author_email": "gosha753951@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "sparsedlist\n===========\n\n**sparsedlist** is endless list with non-contiguous indexes. Based on\n`Skip list `__ data structure.\nPython3 is used.\n\n**sparsedlist** is a list structure, where set of indexes can have\n\u201cgaps\u201d and you can put a value to any index. In other words, the\nstructure is similar to dict, but has list interface and sorted numeric\nindexes.\n\nSince *skiplist* structure is used as machinery, then you have fast\nforward iteration with O(1) complexity and pretty good\nindexation/insertion/deletion with O(log n) complexity.\n\nExample:\n\n.. code:: python\n\n >>> from sparsedlist import SparsedList\n >>> s = SparsedList()\n >>> s[180] = 'rock the microphone'\n >>> s[10:20] = range(10)\n >>> print(s)\n SparsedList{{10: 0, 11: 1, 12: 2, 13: 3, 14: 4, 15: 5, 16: 6, 17: 7, 18: 8, 19: 9, 180: 'rock the microphone'}}\n >>> print(s[180])\n rock the microphone\n >>> print(s[-1])\n rock the microphone\n >>> print(s[-2])\n None\n >>> print(list(s[18:23]))\n [8, 9, None, None, None]\n >>> print(s[100500])\n None\n\nBy default **sparsedlist** substitutes item on **None** value if it has\nnot set. To disable this feature, pass *required* param to constructor.\nThen **IndexError** will be raised on getting unset items. For instance:\n\n.. code:: python\n\n >>> from sparsedlist import SparsedList\n >>> s = SparsedList(required=True)\n >>> s[10:20] = range(10)\n >>> print(s[100500])\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"/usr/local/lib/python3.6/dist-packages/sparsedlist.py\", line 73, in __getitem__\n raise IndexError(\"Item with index '{}' does not exist\".format(item))\n IndexError: Item with index '100500' does not exist\n >>> print(list(s[18:25]))\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"/usr/local/lib/python3.6/dist-packages/sparsedlist.py\", line 73, in __getitem__\n raise IndexError(\"Item with index '{}' does not exist\".format(item))\n IndexError: Item with index '20' does not exist\n\nDependencies\n============\n\n``pyskiplist`` only. Tested on ``python3.6``.\n\nInstallation\n============\n\n::\n\n pip3 install sparsedlist\n\nAuthor\n======\n\nIgor Derkach, gosha753951@gmail.com\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bdragon300/sparsedlist", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "sparsedlist", "package_url": "https://pypi.org/project/sparsedlist/", "platform": "", "project_url": "https://pypi.org/project/sparsedlist/", "project_urls": { "Homepage": "https://github.com/bdragon300/sparsedlist" }, "release_url": "https://pypi.org/project/sparsedlist/0.4/", "requires_dist": [ "pyskiplist" ], "requires_python": "", "summary": "Endless list with non-contiguous indexes", "version": "0.4" }, "last_serial": 4292070, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "e36462279944461f19d52ca5d6a2f8e9", "sha256": "776fcaa1d8794cdd337d81ea631b9b25de9f60ea498e41435b2c3d6e8258fe6b" }, "downloads": -1, "filename": "sparsedlist-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e36462279944461f19d52ca5d6a2f8e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4805, "upload_time": "2018-09-03T19:25:07", "url": "https://files.pythonhosted.org/packages/d8/a5/56a4f5ce4c08cb71300ee4a1541d2e5c4f13007c738ac1cbdb5ded253805/sparsedlist-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2ee9c32cc38595445ef57ad85b1a46c", "sha256": "1767fe739e87564d7a89256496ce16a49a9aa9392c1da5fe634153bfeb5d1824" }, "downloads": -1, "filename": "sparsedlist-0.2.tar.gz", "has_sig": false, "md5_digest": "a2ee9c32cc38595445ef57ad85b1a46c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4684, "upload_time": "2018-09-03T19:25:08", "url": "https://files.pythonhosted.org/packages/58/1b/d5fb5abe9d2d3731fcdfac27b7a02809b58404d2b878a234ac6a351cb9d7/sparsedlist-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "939c44a1250e4fcdf0a7c1eeb4de1a3d", "sha256": "d54d478cf1a633372b2a1acc652ef7fe0bf9a67af44ce41c5ed917f023f8380f" }, "downloads": -1, "filename": "sparsedlist-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "939c44a1250e4fcdf0a7c1eeb4de1a3d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5145, "upload_time": "2018-09-11T09:41:37", "url": "https://files.pythonhosted.org/packages/06/9b/bf7a3602121f1b2a9d3d98137df398674007541d6f1aeac52ed81287c49d/sparsedlist-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1476d5ad361f4b2dc36b4dd86676a703", "sha256": "b8c8b1c7e9aa6883cd4ed4b1b588efa019e9f03b1aa1de195dcc2457e6fd7384" }, "downloads": -1, "filename": "sparsedlist-0.3.tar.gz", "has_sig": false, "md5_digest": "1476d5ad361f4b2dc36b4dd86676a703", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5029, "upload_time": "2018-09-11T09:41:38", "url": "https://files.pythonhosted.org/packages/af/f0/c34790eb6126ecd57988a237aa21c4d3b0a40f0e0e5d87815a7cae2ffcbc/sparsedlist-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "946d120260dfc8007d9fbfbbbd328936", "sha256": "4978184ce4c188f4300febfa8a1db5fb427928fa6069f155c55c09bb5d9b6872" }, "downloads": -1, "filename": "sparsedlist-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "946d120260dfc8007d9fbfbbbd328936", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5142, "upload_time": "2018-09-20T09:59:19", "url": "https://files.pythonhosted.org/packages/af/30/aedd6a638c636bc77b50679fe7c8be01200b521f516da2c2aa16e903bed3/sparsedlist-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "841d79769f5d4514e70a57252bc10a00", "sha256": "bbd2284c0b29b12a94e611cc8a7ebcf38449bd6b81f1e3bc1c402926820cbd0d" }, "downloads": -1, "filename": "sparsedlist-0.4.tar.gz", "has_sig": false, "md5_digest": "841d79769f5d4514e70a57252bc10a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5027, "upload_time": "2018-09-20T09:59:21", "url": "https://files.pythonhosted.org/packages/a8/9a/0087b24a0cb3278edd8e60b82878788c2fd7234c0f36259a95823b81486a/sparsedlist-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "946d120260dfc8007d9fbfbbbd328936", "sha256": "4978184ce4c188f4300febfa8a1db5fb427928fa6069f155c55c09bb5d9b6872" }, "downloads": -1, "filename": "sparsedlist-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "946d120260dfc8007d9fbfbbbd328936", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5142, "upload_time": "2018-09-20T09:59:19", "url": "https://files.pythonhosted.org/packages/af/30/aedd6a638c636bc77b50679fe7c8be01200b521f516da2c2aa16e903bed3/sparsedlist-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "841d79769f5d4514e70a57252bc10a00", "sha256": "bbd2284c0b29b12a94e611cc8a7ebcf38449bd6b81f1e3bc1c402926820cbd0d" }, "downloads": -1, "filename": "sparsedlist-0.4.tar.gz", "has_sig": false, "md5_digest": "841d79769f5d4514e70a57252bc10a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5027, "upload_time": "2018-09-20T09:59:21", "url": "https://files.pythonhosted.org/packages/a8/9a/0087b24a0cb3278edd8e60b82878788c2fd7234c0f36259a95823b81486a/sparsedlist-0.4.tar.gz" } ] }