{ "info": { "author": "Jonathan Goble", "author_email": "jcgoble3@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: General" ], "description": "luapatt |travis-develop|\n========================\n\nA Python 3.3+ implementation of the `Lua language\u2019s`_ pattern matching\nfunctions. Lua\u2019s pattern matching is simpler than regular expressions\nand lacks several features that regexes have, such as ``|`` for\nalternation, but also contains some features difficult or impossible to\nduplicate in most regex flavors, such as the ability to easily match a\nbalanced pair of parentheses (or any two other characters).\n\nInstallation\n------------\n\n``pip install luapatt``\n\nDocumentation\n-------------\n\nFor documentation on how pattern matching works, please read the `Lua\nreference manual`_. This library contains the following differences from\nstock Lua:\n\n- ``%c``, ``%g``, ``%p``, and their negated counterparts are not\n available; attempting to use them will raise the built-in\n ``NotImplementedError``.\n- Other character classes that rely on the meaning of a character call\n Python\u2019s ``str.is*`` family of methods, and so use the Unicode\n definition of that meaning.\n- String positions are zero-based instead of one-based, reflecting the\n fact that Python is generally zero-based (as opposed to Lua, which\n has one-based indexes). This affects position captures and the\n indexes returned as the first two results from ``find()``.\n- Function return values are combined into a tuple, as is standard with\n Python. However, singleton tuples are not returned; the single value\n is returned directly instead.\n- ``gsub()`` does *not* return the number of substitutions by default,\n instead returning only the new string. To get the count, pass the\n named argument ``count=True`` to the call (which will result in a\n 2-tuple of the new string and the count).\n- An extra function, ``set_escape_char()``, is provided to change the\n escape character. It takes one argument: the new escape character,\n which must be a ``str`` object of length 1. The escape character\n cannot be set to any of the other special characters. While it is\n possible to set it to a letter or number, this is not recommended as\n it may interfere with other aspects of pattern matching, and doing so\n may be disallowed in the future.\n\n - **NOTE:** Because ``set_escape_char`` modifies global state, it is\n **not** thread-safe.\n\n- Unlike Lua, which has no notion of a Unicode string and assumes all\n characters are one byte in length, this library operates on full\n Unicode strings (i.e. ``str`` objects). If you pass bytes objects to\n this library, the behavior is undefined.\n\nLicensing\n---------\n\nAs with Lua itself, this library is released under the MIT License.\n\n.. _Lua language\u2019s: http://www.lua.org/home.html\n.. _Lua reference manual: http://www.lua.org/manual/5.3/manual.html#6.4.1\n.. |travis-develop| image:: https://travis-ci.org/jcgoble3/luapatt.svg?branch=develop\n :target: https://travis-ci.org/jcgoble3/luapatt", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jcgoble3/luapatt", "keywords": "Lua pattern matching regex regular expressions", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "luapatt", "package_url": "https://pypi.org/project/luapatt/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/luapatt/", "project_urls": { "Homepage": "https://github.com/jcgoble3/luapatt" }, "release_url": "https://pypi.org/project/luapatt/0.9.0b5/", "requires_dist": [ "pytest; extra == 'test'" ], "requires_python": "", "summary": "Python implementation of Lua-style pattern matching", "version": "0.9.0b5" }, "last_serial": 1879453, "releases": { "0.9.0b4": [ { "comment_text": "", "digests": { "md5": "d88892b17d2a0f9eab64726f8c93ba83", "sha256": "17ca9835c21a4bdb508c570379fc0fb5ae6010a1580d7e102eee6e2a55790e5d" }, "downloads": -1, "filename": "luapatt-0.9.0b4-py3-none-any.whl", "has_sig": false, "md5_digest": "d88892b17d2a0f9eab64726f8c93ba83", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10019, "upload_time": "2015-12-28T00:26:08", "url": "https://files.pythonhosted.org/packages/14/21/fc64463fc9059e1c72e80d16c34a5d2e04d6388929158a90ac970be629b0/luapatt-0.9.0b4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d5534c79b813a682f3af6aa66eebc6fc", "sha256": "191d10044a7597cd8df985f6a61a74a8aeae472322370e88c8451bffb30e62c6" }, "downloads": -1, "filename": "luapatt-0.9.0b4.tar.gz", "has_sig": false, "md5_digest": "d5534c79b813a682f3af6aa66eebc6fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7758, "upload_time": "2015-12-28T00:26:28", "url": "https://files.pythonhosted.org/packages/6b/6a/88b2f68e5dc949d909e712f402b9d29e5aa09ec6918d254651369124c9b6/luapatt-0.9.0b4.tar.gz" } ], "0.9.0b5": [ { "comment_text": "", "digests": { "md5": "97906ccbad713dcceb5998d8b76e4806", "sha256": "b2e5470b2584594a8d858f70e15928cdc64251e9390a780a9fe163267b30d476" }, "downloads": -1, "filename": "luapatt-0.9.0b5-py3-none-any.whl", "has_sig": false, "md5_digest": "97906ccbad713dcceb5998d8b76e4806", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10019, "upload_time": "2015-12-28T05:57:06", "url": "https://files.pythonhosted.org/packages/09/30/30a25919b0d34b4c9120c25d3521f11a7c3d7abd300dc103d9691cef103a/luapatt-0.9.0b5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b800b0a8e4f694fb3c8f0dd63136cffb", "sha256": "0ec90c0ed6fa64df060b89ae4acc3bfe3153b9f4bd0b09f8d1911966a0cfb094" }, "downloads": -1, "filename": "luapatt-0.9.0b5.tar.gz", "has_sig": false, "md5_digest": "b800b0a8e4f694fb3c8f0dd63136cffb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7754, "upload_time": "2015-12-28T05:57:11", "url": "https://files.pythonhosted.org/packages/23/6a/bf9ee08496d6697778b9269c04630853ca99459c5a9cc5624cf70ef9de7b/luapatt-0.9.0b5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97906ccbad713dcceb5998d8b76e4806", "sha256": "b2e5470b2584594a8d858f70e15928cdc64251e9390a780a9fe163267b30d476" }, "downloads": -1, "filename": "luapatt-0.9.0b5-py3-none-any.whl", "has_sig": false, "md5_digest": "97906ccbad713dcceb5998d8b76e4806", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10019, "upload_time": "2015-12-28T05:57:06", "url": "https://files.pythonhosted.org/packages/09/30/30a25919b0d34b4c9120c25d3521f11a7c3d7abd300dc103d9691cef103a/luapatt-0.9.0b5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b800b0a8e4f694fb3c8f0dd63136cffb", "sha256": "0ec90c0ed6fa64df060b89ae4acc3bfe3153b9f4bd0b09f8d1911966a0cfb094" }, "downloads": -1, "filename": "luapatt-0.9.0b5.tar.gz", "has_sig": false, "md5_digest": "b800b0a8e4f694fb3c8f0dd63136cffb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7754, "upload_time": "2015-12-28T05:57:11", "url": "https://files.pythonhosted.org/packages/23/6a/bf9ee08496d6697778b9269c04630853ca99459c5a9cc5624cf70ef9de7b/luapatt-0.9.0b5.tar.gz" } ] }