{ "info": { "author": "Alberto Berti", "author_email": "alberto@metapensiero.it", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Code Generators" ], "description": ".. -*- coding: utf-8 -*-\n\n=============================\n MacroPy3 1.1.0b2\n=============================\n\n.. image:: https://travis-ci.org/azazel75/macropy.svg?branch=master\n :target: https://travis-ci.org/azazel75/macropy\n\n**MacroPy** is an implementation of `Syntactic Macros\n`_ in the `Python Programming Language\n`_. MacroPy provides a mechanism for user-defined\nfunctions (macros) to perform transformations on the `abstract syntax\ntree `_ (AST) of a\nPython program at *import time*. This is an easy way to enhance the\nsemantics of a Python program in ways which are otherwise impossible,\nfor example providing an extremely concise way of declaring classes.\n\nPython like you've never seen before\n====================================\n\nMacroPy allows you to create constructs which are impossible to have\nin normal python code, such as:\n\nTracing\n-------\n\n.. code:: python\n\n with trace:\n sum([x + 5 for x in range(3)])\n\n # sum([x + 5 for x in range(3)])\n # range(3) -> [0, 1, 2]\n # x + 5 -> 5\n # x + 5 -> 6\n # x + 5 -> 7\n # [x + 5 for x in range(3)] -> [5, 6, 7]\n # sum([x + 5 for x in range(3)]) -> 18\n\nQuick Lambdas\n-------------\n\n.. code:: python\n\n print(list(map(f[_[0]], ['omg', 'wtf', 'bbq'])))\n # ['o', 'w', 'b']\n\n print(list(reduce(f[_ + _], ['omg', 'wtf', 'bbq'])))\n # 'omgwtfbbq\n\nCase Classes\n------------\n\n.. code:: python\n\n @case\n class Point(x, y): pass\n\n p = Point(1, 2)\n\n print str(p) #Point(1, 2)\n print p.x #1\n print p.y #2\n print Point(1, 2) == Point(1, 2) # True\n\nand more! See the docs at\n``_.\n\nRequirements\n============\n\nMacroPy3 is tested to run on `CPython 3.4\n`_ or newer and `PyPy\n`_ 3.5. I has no current support for `Jython\n`_. MacroPy3 is also available on `PyPI\n`_.\n\nInstallation\n============\n\nJust execute a:\n\n.. code:: console\n\n $ pip install macropy3\n\nif you want to use macros that require external libraries in order to\nwork, you can automatically install those dependencies by installing\none of the ``pinq`` or ``pyxl`` extras like this:\n\n.. code:: console\n\n $ pip install macropy3[pinq,pyxl]\n\n\nthen have a look at the docs at ``_.\n\nHow to contribute\n=================\n\nWe're open to contributions, so send us your\nideas/questions/issues/pull-requests and we'll do our best to\naccommodate you! You can ask questions on the `Google Group\n`_ and on the\n`Gitter channel `_ or file bugs on\nthee `issues`__ page.\n\n__ https://github.com/lihaoyi/macropy/issues\n\nCredits\n=======\n\nMacroPy was initially created as a final project for the `MIT\n`_ class `6.945: Adventures in Advanced Symbolic\nProgramming `_,\ntaught by `Gerald Jay Sussman\n`_ and `Pavel Panchekha\n`_. Inspiration was taken from project such\nas `Scala Macros `_, `Karnickel\n`_ and `Pyxl\n`_.\n\nThe MIT License (MIT)\n\nCopyright (c) 2013-2018, `Li Haoyi `_, `Justin\nHolmgren `_, `Alberto Berti\n`_ and all the other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\nChangelog\n=========\n\n1.1.0 (unreleased)\n------------------\n\n1.1.0b2 (2018-05-12)\n--------------------\n\n- Fix readme.\n\n1.1.0b1 (2018-05-12)\n--------------------\n\n- Fix and re-enable the ``SaveExporter()`` class.\n\n- Fix some issues with pattern matching module requiring non obvious\n imports from user's side.\n\n- Fix pattern matching macro need to import ``_matching`` symbol\n\n- Add an ``OptionalMatcher`` to pattern matching macro to support\n exclusive or conditions.\n\n- Refactor documentation using sphinx.\n\n- Refactor the macro expansion core code. Now the macro expansion\n order is from inside-out. This allows to use macros inside other\n macro's body.\n\n- Added support for Python 3.4.\n\n- Added ``SELECT * FROM country`` emulation in `pinq` macro.\n\n- Update the examples.\n\n- Update tco and pyxl macros.\n\n- Prevent the import hooks from raising errors.\n\n\n1.0.4.dev2 (2017-09-08)\n-----------------------\n\n- Add MANIFEST.in;\n\n1.0.4.dev1 (2017-09-08)\n-----------------------\n\n- Updated the import machinery and macro detection to be compatible\n with Python 3.5+.\n\n- Removed support for Python 2, supporting it would require a way to\n manage differences at the ast level, but i don't use Python2 anymore.\n\n- Added support for Python 3.5+ in the form of new call arguments form\n and new ``AsyncFunctionDef``.\n\n- Basic scope analysis now available in the form of the ``@Scoped``\n decorator, to be used in conjunction with ``@Walker``.\n\n1.0.3\n-----\n\n- Error messages are now raised at run-time rather than at import\n time, with other improvements (double stack traces, catchability).\n\n- ``@enum`` macro now has much better error messages\n\n- Improved error messages for mis-use of stub functions outside their\n related macro (e.g. the ``u``, ``name``, ``ast`` stubs for the ``q``/``hq``\n macros)\n\n- Improved error messages for invalid case class signatures\n\n- Hygienic Quasiquotes now allow lexical capture of module objects\n\n1.0.2\n-----\n\n- Removed unit test from PyPI distribution\n\n1.0.1\n-----\n- Fixed a bug in ``ast_ctx_fixer``\n- ``gen_sym()`` is now ``gen_sym(name=\"sym\")``, allowing you to override the base name\n- Implemented ``macropy.case_classes.enum`` macro\n- Implemented ``macropy.quick_lambda.lazy`` and ``macropy.quick_lambda.interned`` macros\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lihaoyi/macropy", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "macropy3", "package_url": "https://pypi.org/project/macropy3/", "platform": "", "project_url": "https://pypi.org/project/macropy3/", "project_urls": { "Homepage": "https://github.com/lihaoyi/macropy" }, "release_url": "https://pypi.org/project/macropy3/1.1.0b2/", "requires_dist": null, "requires_python": "", "summary": "Macros for Python: Quasiquotes, Case Classes, LINQ and more!", "version": "1.1.0b2" }, "last_serial": 3855747, "releases": { "1.0.4.dev1": [ { "comment_text": "", "digests": { "md5": "18221265c9b74e6761e833e0425bf1bd", "sha256": "33ddbd9165376ddafea0b5976af9bcf62e390d42f285ae87a583614b96e1786b" }, "downloads": -1, "filename": "macropy3-1.0.4.dev1.tar.gz", "has_sig": false, "md5_digest": "18221265c9b74e6761e833e0425bf1bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33971, "upload_time": "2017-09-08T16:43:32", "url": "https://files.pythonhosted.org/packages/44/01/303085c9d00687694e9bc3760093794a88f4784c05217b2eb82b2a0a0f76/macropy3-1.0.4.dev1.tar.gz" } ], "1.0.4.dev2": [ { "comment_text": "", "digests": { "md5": "ad46a5cfcee05fb071ab23c0d24498e7", "sha256": "5f6049bb8b9d1ac7b2a4344da717dab5333fca46f4fa33a1590c223d89f4adde" }, "downloads": -1, "filename": "macropy3-1.0.4.dev2.tar.gz", "has_sig": false, "md5_digest": "ad46a5cfcee05fb071ab23c0d24498e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 86748, "upload_time": "2017-09-08T17:32:53", "url": "https://files.pythonhosted.org/packages/c3/c6/0b8acef4cefc70cd6070a116b3cbaad806e432f7dc4c57ab8e0c5c2f73d3/macropy3-1.0.4.dev2.tar.gz" } ], "1.1.0b1": [ { "comment_text": "", "digests": { "md5": "eef099923c62ec9e36ea7e8d7686384f", "sha256": "36a143130fc8a2dd9186f9142dc36eecde68c8062143e14a46b36e2c62cc8b35" }, "downloads": -1, "filename": "macropy3-1.1.0b1.tar.gz", "has_sig": false, "md5_digest": "eef099923c62ec9e36ea7e8d7686384f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44335, "upload_time": "2018-05-11T23:00:00", "url": "https://files.pythonhosted.org/packages/df/53/32f8b71b09c479296ccb858b76443c3b24b20b5cfaa8ce0bd289cdb2e631/macropy3-1.1.0b1.tar.gz" } ], "1.1.0b2": [ { "comment_text": "", "digests": { "md5": "2e0a2d25f9b2ba6e04d51e3b6d11bd67", "sha256": "7a8eae9886ea4a5df4fcf4f71f53165b82becfc7fc87d9c1c8cd2196f22d9408" }, "downloads": -1, "filename": "macropy3-1.1.0b2.tar.gz", "has_sig": false, "md5_digest": "2e0a2d25f9b2ba6e04d51e3b6d11bd67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44304, "upload_time": "2018-05-11T23:17:05", "url": "https://files.pythonhosted.org/packages/8c/b7/a61f9d9bd7de80ca51ef362db5bb6434ea21484c907d2a5f396d97b0274c/macropy3-1.1.0b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e0a2d25f9b2ba6e04d51e3b6d11bd67", "sha256": "7a8eae9886ea4a5df4fcf4f71f53165b82becfc7fc87d9c1c8cd2196f22d9408" }, "downloads": -1, "filename": "macropy3-1.1.0b2.tar.gz", "has_sig": false, "md5_digest": "2e0a2d25f9b2ba6e04d51e3b6d11bd67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44304, "upload_time": "2018-05-11T23:17:05", "url": "https://files.pythonhosted.org/packages/8c/b7/a61f9d9bd7de80ca51ef362db5bb6434ea21484c907d2a5f396d97b0274c/macropy3-1.1.0b2.tar.gz" } ] }