{ "info": { "author": "hephaestus", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# dispatk\n\n## Description\n\nThis function is inspired by singledispatch of Python 3.4+ (PEP 443),\nbut the dispatch happens on the key extracted fro the arguments values.\n\n```\nfrom dispatk import dispatk\n\n@dispatk(lambda n: int(n))\ndef fib(n):\n return fib(n-1) + fib(n-2)\n@fib.register(0)\ndef _(n):\n return 0\n@fib.register(1, 2)\ndef _(n):\n return 1\n@fib.register(41)\ndef _(n):\n return 165580141\n```\n\n*register* accepts one or more keys, so\n\n```\n@fib.register(1, 2)\ndef _(n):\n return 1\n```\n\nis equivalent to\n\n```\n@fib.register(1)\n@fib.register(2)\ndef _(n):\n return 1\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hephs/dispatk", "keywords": "multiple dispatch generic functions genericfunctions decorator", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "dispatk", "package_url": "https://pypi.org/project/dispatk/", "platform": "any", "project_url": "https://pypi.org/project/dispatk/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hephs/dispatk" }, "release_url": "https://pypi.org/project/dispatk/0.1/", "requires_dist": null, "requires_python": null, "summary": "Multiple dispatcher on arguments values.", "version": "0.1" }, "last_serial": 1757384, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d8676cdcc89cd54bd2e77908fb239abc", "sha256": "be4b912cba8cc968c43228a6b58ae88896b4afa703e03165b62ec55e4a2cbedf" }, "downloads": -1, "filename": "dispatk-0.1-py2.7.egg", "has_sig": false, "md5_digest": "d8676cdcc89cd54bd2e77908fb239abc", "packagetype": "bdist_egg", "python_version": "any", "requires_python": null, "size": 3370, "upload_time": "2015-10-07T22:51:03", "url": "https://files.pythonhosted.org/packages/d4/7b/24e24ed021a09e61826057bc56013fb1a4532bc883851e36b4531f8f4ab4/dispatk-0.1-py2.7.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d8676cdcc89cd54bd2e77908fb239abc", "sha256": "be4b912cba8cc968c43228a6b58ae88896b4afa703e03165b62ec55e4a2cbedf" }, "downloads": -1, "filename": "dispatk-0.1-py2.7.egg", "has_sig": false, "md5_digest": "d8676cdcc89cd54bd2e77908fb239abc", "packagetype": "bdist_egg", "python_version": "any", "requires_python": null, "size": 3370, "upload_time": "2015-10-07T22:51:03", "url": "https://files.pythonhosted.org/packages/d4/7b/24e24ed021a09e61826057bc56013fb1a4532bc883851e36b4531f8f4ab4/dispatk-0.1-py2.7.egg" } ] }