{ "info": { "author": "David Baird", "author_email": "dhbaird@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python" ], "description": "Splarnektity provides a limited, but valuable, form of functional pattern\nmatching to Python, a la OCaml, Erlang, Haskell, et al.. Another way\nof thinking of this is: pattern matching over Python lists.\n\n\nHere is a quick example of Splarnektity's usage::\n\n from splarnektity import FMatch\n\n sexpr = ('person',\n ('name', 'john'),\n ('address', ('line1', '123 Townville'), ('zip', 54321)),\n ('age', 24),\n ('favorite foods', 'pizza', 'dorritos'),\n )\n\n for x in sexpr[1:]:\n f = FMatch(x)\n V1, V2 = f.var(2)\n if f.when(('name', V1)):\n print 'name: ', V1.v\n elif f.when(('address', ('line1', V1), ('zip', V2))) and V2.int:\n print 'address line1: ', V1.v\n print 'address zip: ', V2.v\n elif f.when(('age', V1)) and V1.int:\n print 'age: ', V1.v\n elif f.when(('favorite foods', V1.others)): # variable length matching\n print 'favorite foods:', V1.v\n\nThe result of this example is::\n\n name: john\n address line1: 123 Townville\n address zip: 54321\n age: 24\n favorite foods: ('pizza', 'dorritos')", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.aclevername.com/projects/splarnektity", "keywords": "functional pattern matching python", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "splarnektity", "package_url": "https://pypi.org/project/splarnektity/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/splarnektity/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.aclevername.com/projects/splarnektity" }, "release_url": "https://pypi.org/project/splarnektity/0.3/", "requires_dist": null, "requires_python": null, "summary": "Functional Pattern Matching for Python", "version": "0.3" }, "last_serial": 66085, "releases": { "0.1": [], "0.2": [], "0.3": [] }, "urls": [] }