{ "info": { "author": "Joe Jevnik", "author_email": "joejev@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython" ], "description": "``fz`` 0.1\n==========\n\nQuick and efficient lambda functions.\n\nWhat is ``fz``?\n---------------\n\n``fz`` provides a nicer way to define lambda functions for Python 3. The syntax\nis inspired by C++ ``std::bind``, Scala lambdas, and `quicklambda\n`_ for python.\n\n\nSyntax\n------\n\n``fz`` lambdas use placeholder objects to represent the arguments to the new\nlambda. The placeholders look like: ``_1``, ``_2``, ..., all the way to ``_255``\n(the maximum number of positional arguments to a function).\n\nTo create a lambda, just build up an expression using these placeholders where\nyou want the arguments to go.\n\nExample Uses\n------------\n\nSimple Arithmetic\n~~~~~~~~~~~~~~~~~\n\nMany lambdas are just simple arithmetic. For example:\n\n.. code-block:: python\n\n >>> from fz import _1\n >>> f = _1 + 1\n >>> f(1)\n 2\n >>> f(3)\n 4\n >>> (_1 * 2)(3)\n 6\n >>> (_1 ** 2)(3)\n 9\n >>> list(map(_1 ** 2, range(5)))\n [0, 1, 4, 9, 16]\n\n\nAttribute and Item Access\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block::\n\n >>> from fz import _1\n\n >>> _1[0]([1, 2])\n 1\n >>> list(map(_1[1], [(0, 1), (2, 3), (4, 5)]))\n [1, 3, 5]\n >>> _1.imag(1j)\n 1.0\n >>> list(map(_1.imag, (1j, 1 + 2j, 2 + 3j)))\n [1, 2, 3]\n\n\nFunction Calls\n~~~~~~~~~~~~~~\n\nBecause we can only wrap things top-down, we must explicitly wrap a function\nto be defered.\n\n.. code-block:: python\n\n >>> from fz import _f, _1, _2, _3\n >>> def f(a, b):\n ... return a + b\n >>> _f(f)(_1, _2)(1, 2)\n 3\n >>> g = _f(f)(_1, -1)\n >>> g(1)\n 0\n\n >>> flip = _f(_1)(_3, _2)\n >>> flip(print, 1, 2)\n 2 1\n\n\nSupported Operations\n~~~~~~~~~~~~~~~~~~~~\n\n- Binary operators\n- Unary operators\n- Attribute access (some names are used for the implementation)\n- Subscript (item access)\n- ``iter``\n- ``next``\n- ``abs``\n\n\nLicense\n-------\n\n``fz`` is free software, licensed under the GNU General Public\nLicense, version 2. For more information see the ``LICENSE`` file.\n\n\nSource\n------\n\nSource code is hosted on github at https://github.com/llllllllll/fz.", "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/llllllllll/_", "keywords": null, "license": "GPL-2", "maintainer": null, "maintainer_email": null, "name": "fz", "package_url": "https://pypi.org/project/fz/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/fz/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/llllllllll/_" }, "release_url": "https://pypi.org/project/fz/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Quick and efficient lambda functions.", "version": "0.1.1" }, "last_serial": 2188678, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f933ea55c7fa83d428a97e5e1135ed3b", "sha256": "d921ae7572680a2d58ab11b77580070077189f49ea02b0f9711e92d6946a7590" }, "downloads": -1, "filename": "fz-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f933ea55c7fa83d428a97e5e1135ed3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5526, "upload_time": "2016-06-27T05:15:54", "url": "https://files.pythonhosted.org/packages/92/de/5377a91b9aad0654b6a169750f0b2e7acde50836e1de1b4f8430a6b48660/fz-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3e0c0ed78f56bfa206a294dd7ba1b89b", "sha256": "cd13d45de2160ddb9377c679e95f789339e22ec12f3f0483c02679cc62cba8bc" }, "downloads": -1, "filename": "fz-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3e0c0ed78f56bfa206a294dd7ba1b89b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5522, "upload_time": "2016-06-27T05:17:06", "url": "https://files.pythonhosted.org/packages/4c/c7/55d6464abb6715aa8e2185718f67c7e0a1aceb40141c6b25533c9dcf37ac/fz-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3e0c0ed78f56bfa206a294dd7ba1b89b", "sha256": "cd13d45de2160ddb9377c679e95f789339e22ec12f3f0483c02679cc62cba8bc" }, "downloads": -1, "filename": "fz-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3e0c0ed78f56bfa206a294dd7ba1b89b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5522, "upload_time": "2016-06-27T05:17:06", "url": "https://files.pythonhosted.org/packages/4c/c7/55d6464abb6715aa8e2185718f67c7e0a1aceb40141c6b25533c9dcf37ac/fz-0.1.1.tar.gz" } ] }