{ "info": { "author": "Hugo Duncan", "author_email": "hugo.duncan@dialogue.co", "bugtrack_url": null, "classifiers": [], "description": "=======================\n dialogue.multi-method\n=======================\n\nA small library to provide multi-methods. All functions are in the\n`dialogue.multi_method` package.\n\nTo create a multi-method, create a dispatch function, that takes the\narguments and returns a hashable value, that is used to dispatch on.\nUse the `@multi` function annotation to annotate the function.\n\nFor each value of the dispatch function that you want to be handled\ndifferently, create a method with that dispatch value.\n\nYou can define a method with no dispatch value, that becomes the\ndefault method if no other method is defined for a dispatch value.\n\n\nAn example::\n\n @multi\n def number(x):\n return x\n\n\n @method(number, 1)\n def number_one(x):\n return 'one'\n\n\n @method(number)\n def number_other(x):\n return \"not one, but \"+ str(c)\n\n\n assert number(1) == 'one'\n assert number(0) == 'not one, but 0'\n\n\nThe dispatch function is available, e.g. for testing::\n\n assert dispatch_fn(number)('x') == 'x'", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dialoguemd/multi-method", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dialogue.multi-method", "package_url": "https://pypi.org/project/dialogue.multi-method/", "platform": "", "project_url": "https://pypi.org/project/dialogue.multi-method/", "project_urls": { "Homepage": "https://github.com/dialoguemd/multi-method" }, "release_url": "https://pypi.org/project/dialogue.multi-method/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.0.5" }, "last_serial": 4872262, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "aa905e6ca16a6d4421bea3a5730a27c9", "sha256": "df830d1293e9654a6f9718803f525c2eb9aaf5cdb02b0f3b77dbdc39b117f98c" }, "downloads": -1, "filename": "dialogue.multi-method-0.0.1.tar.gz", "has_sig": false, "md5_digest": "aa905e6ca16a6d4421bea3a5730a27c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2230, "upload_time": "2017-08-05T00:20:09", "url": "https://files.pythonhosted.org/packages/75/b5/85fe8d2d80330f91cba257c7fd4777581dc63c166ae26a3f9795848a5d29/dialogue.multi-method-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "ba9b5da25366b3a4e0ac5cbe32a35900", "sha256": "53d3b4ea12e8830f71fca944ef942f33481a7520f7fb4742fbabb900aecfab8f" }, "downloads": -1, "filename": "dialogue.multi-method-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ba9b5da25366b3a4e0ac5cbe32a35900", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2266, "upload_time": "2017-08-05T00:47:28", "url": "https://files.pythonhosted.org/packages/69/1e/feed550870748fcdb05fbb6147a3a8d92cf04b38c274e37cacb94228c435/dialogue.multi-method-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "722d18277834fe6ec181fd7779534cb8", "sha256": "6f986d3b93cdb7b4d6d258a44a928f0627e181a176c1f3d7744241cb61994544" }, "downloads": -1, "filename": "dialogue.multi-method-0.0.3.tar.gz", "has_sig": false, "md5_digest": "722d18277834fe6ec181fd7779534cb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2431, "upload_time": "2017-10-06T15:17:55", "url": "https://files.pythonhosted.org/packages/38/ac/0882048cd96128936c716aad03e7cf6f3dcd01295cc58c462eda3c2995a1/dialogue.multi-method-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "9ea0c78c34015fb8074cd1a59c5931d9", "sha256": "cbb0740227423cc6cfec71bb70a8cf43a23e94addf4f4c6861f5059167c83d6d" }, "downloads": -1, "filename": "dialogue.multi-method-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9ea0c78c34015fb8074cd1a59c5931d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2453, "upload_time": "2017-10-18T17:55:34", "url": "https://files.pythonhosted.org/packages/07/80/96fffacf213c0a8e01259988576ed8a8d54b8e92242a8307af6378dbd623/dialogue.multi-method-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c8b9d3b0022f990b8778776d7dc86112", "sha256": "6f83adb2802c327514d1ad3fdb32cfefcc0818ba1e6281a35b595254caa21473" }, "downloads": -1, "filename": "dialogue.multi-method-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c8b9d3b0022f990b8778776d7dc86112", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2475, "upload_time": "2019-02-27T02:04:29", "url": "https://files.pythonhosted.org/packages/8d/59/1dc742320c5dc21abac38553deb11b34482e2c7779dbb30ab05dc5de8167/dialogue.multi-method-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8b9d3b0022f990b8778776d7dc86112", "sha256": "6f83adb2802c327514d1ad3fdb32cfefcc0818ba1e6281a35b595254caa21473" }, "downloads": -1, "filename": "dialogue.multi-method-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c8b9d3b0022f990b8778776d7dc86112", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2475, "upload_time": "2019-02-27T02:04:29", "url": "https://files.pythonhosted.org/packages/8d/59/1dc742320c5dc21abac38553deb11b34482e2c7779dbb30ab05dc5de8167/dialogue.multi-method-0.0.5.tar.gz" } ] }