hint-overload


Namehint-overload JSON
Version 0.0.0 PyPI version JSON
download
home_pageNone
SummaryA project to allow overloading functions and methods based of the type hints
upload_time2024-06-28 21:04:05
maintainerNone
docs_urlNone
authorRJ_Infinity
requires_python>=3.12
licenseMIT License Copyright (c) 2024 RJ_Infinity Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords overload function overloading type-hints method overloading multiple dispatch dynamic dispatch
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # overload

this allows for overloads based upon type hints amongst other things

```py
#just use @overload
@overload
def a()->None:
	"""this one prints 1st and returns none"""
	print("1st")
@overload
def a(a):print("2nd")
@overload
def a(a,b,*args):print("3rd")

a() # prints 1st
a(0) # prints 2nd
a(a=0) # prints 2nd
a(0,1,2,3,4,5) # prints 3rd
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hint-overload",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "overload, function overloading, type-hints, method overloading, multiple dispatch, dynamic dispatch",
    "author": "RJ_Infinity",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/07/68/78510a23d4f76a892ca2ad8c9dddbe4af9e82cc2101b3e9a19c586361655/hint_overload-0.0.0.tar.gz",
    "platform": null,
    "description": "# overload\r\n\r\nthis allows for overloads based upon type hints amongst other things\r\n\r\n```py\r\n#just use @overload\r\n@overload\r\ndef a()->None:\r\n\t\"\"\"this one prints 1st and returns none\"\"\"\r\n\tprint(\"1st\")\r\n@overload\r\ndef a(a):print(\"2nd\")\r\n@overload\r\ndef a(a,b,*args):print(\"3rd\")\r\n\r\na() # prints 1st\r\na(0) # prints 2nd\r\na(a=0) # prints 2nd\r\na(0,1,2,3,4,5) # prints 3rd\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 RJ_Infinity  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A project to allow overloading functions and methods based of the type hints",
    "version": "0.0.0",
    "project_urls": {
        "Documentation": "https://github.com/RJ-Infinity/overload",
        "Homepage": "https://github.com/RJ-Infinity/overload",
        "Issues": "https://github.com/RJ-Infinity/overload/issues",
        "Repository": "https://github.com/RJ-Infinity/overload"
    },
    "split_keywords": [
        "overload",
        " function overloading",
        " type-hints",
        " method overloading",
        " multiple dispatch",
        " dynamic dispatch"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b0d98e77bb538fabfd9aea6927807af95abf3378f19e52bcb49046a25633f8b",
                "md5": "451ab549cd11c0970ef138688ce108a5",
                "sha256": "40de8d199d059250adb7e336357a9434ff520a7e74bad4d462374dcd9b010b95"
            },
            "downloads": -1,
            "filename": "hint_overload-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "451ab549cd11c0970ef138688ce108a5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 5459,
            "upload_time": "2024-06-28T21:04:03",
            "upload_time_iso_8601": "2024-06-28T21:04:03.941671Z",
            "url": "https://files.pythonhosted.org/packages/4b/0d/98e77bb538fabfd9aea6927807af95abf3378f19e52bcb49046a25633f8b/hint_overload-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "076878510a23d4f76a892ca2ad8c9dddbe4af9e82cc2101b3e9a19c586361655",
                "md5": "c1cc409d5b57039585732dfa7e25e983",
                "sha256": "4effb5825051ade4a2ba4d874e38bce033e1647b063b4854b7810b6880eb9b4c"
            },
            "downloads": -1,
            "filename": "hint_overload-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c1cc409d5b57039585732dfa7e25e983",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 4390,
            "upload_time": "2024-06-28T21:04:05",
            "upload_time_iso_8601": "2024-06-28T21:04:05.270554Z",
            "url": "https://files.pythonhosted.org/packages/07/68/78510a23d4f76a892ca2ad8c9dddbe4af9e82cc2101b3e9a19c586361655/hint_overload-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-28 21:04:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RJ-Infinity",
    "github_project": "overload",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "hint-overload"
}
        
Elapsed time: 2.92472s