{ "info": { "author": "Thomas Li Fredriksen", "author_email": "tom@lifredriksen.no", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "NeoPySwitch\n===========\n\nPython ``switch``-statement pseudo-implementation. Mimics C-style switch\nstatements.\n\nThe following two code blocks should be equivalent:\n\nC/C++\n~~~~~\n\n.. code:: c\n\n switch(arg):\n {\n case 1:\n // Handle case\n case 2:\n // Handle case\n default:\n // Handle default case\n }\n\nPython\n~~~~~~\n\n.. code:: python\n\n @SwitchCase\n def case_1(arg1):\n print 'Case 1: ', arg1\n\n @SwitchCase\n def case_2(arg1, arg2):\n print 'Case 2: ', arg2\n\n @SwitchCase\n def default_case(arg1, arg2, arg3):\n print 'Default case: ', arg1, arg2, arg3\n\n PySwitch(3, {\n 1: case_1('a'),\n 2: case_2('abc', 42),\n }, default_case(13, 'somestring', 3.14))\n\nInstallation\n------------\n\nSimply use pip:\n\n::\n\n $ pip install NeoPySwitch\n\nContributing\n------------\n\n1. Fork it!\n2. Create your feature branch: ``git checkout -b my-new-feature``\n3. Commit your changes: ``git commit -am 'Add some feature'``\n4. Push to the branch: ``git push origin my-new-feature``\n5. Submit a pull request :D\n\nHistory\n-------\n\n- 0.1.0 - First alpha-release\n\nCredits\n-------\n\n- `Zeno Rocha `__ - `GitHub README\n template `__\n- `Ethan Forman `__ -\n ```setup.py``-reference `__\n\nLicense\n-------\n\nThe MIT License (MIT) Copyright (c) 2017 Thomas Li Fredriksen\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thomafred/NeoPySwitch", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "NeoPySwitch", "package_url": "https://pypi.org/project/NeoPySwitch/", "platform": "", "project_url": "https://pypi.org/project/NeoPySwitch/", "project_urls": { "Homepage": "https://github.com/thomafred/NeoPySwitch" }, "release_url": "https://pypi.org/project/NeoPySwitch/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Python switch implementation", "version": "0.2.1" }, "last_serial": 2818891, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "8a952393148ff7e1ce84d7d0c579b038", "sha256": "9794f3de027b3135c8bb25a40a959840ed28281a29b0e6f78746bb1beb3a7de3" }, "downloads": -1, "filename": "NeoPySwitch-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8a952393148ff7e1ce84d7d0c579b038", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3573, "upload_time": "2017-04-20T13:35:55", "url": "https://files.pythonhosted.org/packages/e2/87/cc2e26e26edbc037c4f3f6e41ff4494a8194f66b831b50ed617261c265f9/NeoPySwitch-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2f036927a55a0f9feb43ef70b06af902", "sha256": "ac809f6eb4e5dfe26930c94dab44cf78097317c9db60f73f92196f7467d0bc08" }, "downloads": -1, "filename": "NeoPySwitch-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2f036927a55a0f9feb43ef70b06af902", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3676, "upload_time": "2017-04-20T14:38:50", "url": "https://files.pythonhosted.org/packages/36/32/c35cb00be225e2f68182e19f9e4efeec76b54d4533a51476e5aba1c43fc3/NeoPySwitch-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "808a2299609ce49ce835fbce292aa5b7", "sha256": "e14c3ad292cf6f03618079573c5933878bd438e36832385c01c7659e49554234" }, "downloads": -1, "filename": "NeoPySwitch-0.2.1.tar.gz", "has_sig": false, "md5_digest": "808a2299609ce49ce835fbce292aa5b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3630, "upload_time": "2017-04-21T08:01:04", "url": "https://files.pythonhosted.org/packages/49/3d/0344915daa0b59eeeee26d284199d1b48d37647d62303d3fe0925f86624b/NeoPySwitch-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "808a2299609ce49ce835fbce292aa5b7", "sha256": "e14c3ad292cf6f03618079573c5933878bd438e36832385c01c7659e49554234" }, "downloads": -1, "filename": "NeoPySwitch-0.2.1.tar.gz", "has_sig": false, "md5_digest": "808a2299609ce49ce835fbce292aa5b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3630, "upload_time": "2017-04-21T08:01:04", "url": "https://files.pythonhosted.org/packages/49/3d/0344915daa0b59eeeee26d284199d1b48d37647d62303d3fe0925f86624b/NeoPySwitch-0.2.1.tar.gz" } ] }