{ "info": { "author": "Yahya Abou Imran", "author_email": "yahya-abou-imran@pm.me", "bugtrack_url": null, "classifiers": [], "description": "# Hybrid Set\n\n`HybridSet` is a `MutableSet` that stores apart hashable and unashable values. \nIt's fully compatible with the builtins `set` and `frozenset`\n\n\n```python\n\n>>> from hybridset import HybridSet\n>>> hs = HybridSet([3, 'thing', [True], {3, 4}, {1: 'one', 2: 'two'}])\n>>> s = {3, 4, 5}\n>>> s | hs\nHybridSet(hashables={3, 4, 5, 'thing'}, unhashables=[[Ture], {3, 4}, {1: 'one', 2: 'two'}])\n>>> s & hs\nHybridSet(hashables={3})\n\n```\n\n## Know Issues\n\nDon't pass `HybridSet` instances to explicit methods of builtins, it may cause a `TypeError`\nbecause of the unhashable values present in the `HybridSet`.\n\n```python\n\n>>> hs = HybridSet([[6], [7]])\n>>> s.union(hs)\nTraceback (most recent call last):\n ...\nTypeError: unhashable type: 'list'\n>>> s.isdisjoint(hs)\nTraceback (most recent call last):\n ...\nTypeError: unhashable type: 'list'\n\n```\n\nAlways use operators instead. \nFor `isdisjoint()`, test the emptiness of the intersection:\n\n```python\n\n>>> if not s & hs:\n... print('disjoint')\n... else:\n... print('not disjoint')\ndisjoint\n\n```\n\n### For more information, see the class and methods docstrings.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://gitlab.com/yahya-abou-imran/hybridset/-/archive/v1.0/archive.zip/hybridset-v1.0.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/yahya-abou-imran/hybridset", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "hybridset", "package_url": "https://pypi.org/project/hybridset/", "platform": "", "project_url": "https://pypi.org/project/hybridset/", "project_urls": { "Download": "https://gitlab.com/yahya-abou-imran/hybridset/-/archive/v1.0/archive.zip/hybridset-v1.0.zip", "Homepage": "https://gitlab.com/yahya-abou-imran/hybridset" }, "release_url": "https://pypi.org/project/hybridset/1.0/", "requires_dist": null, "requires_python": "", "summary": "Mutable set storing apart hashables and unhashables values", "version": "1.0" }, "last_serial": 4550390, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b8872f2bde7fd28682d9192d216f62c1", "sha256": "2b0ba972dccf02e585d8f75e0b80e17165978b27258a3c5d6b8ef245baa3b457" }, "downloads": -1, "filename": "hybridset-1.0.tar.gz", "has_sig": false, "md5_digest": "b8872f2bde7fd28682d9192d216f62c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16458, "upload_time": "2018-12-01T14:28:01", "url": "https://files.pythonhosted.org/packages/5b/ed/2adf325300b136d542468420f1ce21bd85cf49bf1436326722593320e091/hybridset-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b8872f2bde7fd28682d9192d216f62c1", "sha256": "2b0ba972dccf02e585d8f75e0b80e17165978b27258a3c5d6b8ef245baa3b457" }, "downloads": -1, "filename": "hybridset-1.0.tar.gz", "has_sig": false, "md5_digest": "b8872f2bde7fd28682d9192d216f62c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16458, "upload_time": "2018-12-01T14:28:01", "url": "https://files.pythonhosted.org/packages/5b/ed/2adf325300b136d542468420f1ce21bd85cf49bf1436326722593320e091/hybridset-1.0.tar.gz" } ] }