{ "info": { "author": "Taylor Marks", "author_email": "taylor@marksfam.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.3", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "let\n===\n*Assign variables wherever, whenever you want.*\n\nInstallation\n------------\nInstall via pip:\n\n.. code-block:: bash\n\n $ pip install let\n\nDone.\n\nIf you insist on the (slightly) harder way of installing, from source,\nyou know how to do it already and don't need my help.\n\nI might later upload the source to:\nhttps://github.com/TaylorSMarks/let\n\nQuick Start\n-----------\nOnce you've installed, you can really quickly verified that it works with just this:\n\n.. code-block:: python\n\n >>> from let import let\n >>> if let(count = len('Hello World!')):\n ... print(count)\n 12\n\nDocumentation\n-------------\nIn C, Java, and many other languages, it's possible to assign variables inside\nof if or while condition statements. This is useful in allowing you to concisely\nboth assign the value, and check whether a condition is met.\n\nThis ability doesn't exist in Python, because of the thought that when people\nwrite something like:\n\n.. code-block:: python\n\n if row = db.fetch_results():\n ...\n\nThey may have actually meant:\n\n.. code-block:: python\n\n if row == db.fetch_results():\n ...\n\nPersonally, I have never made this mistake. It seems far more like a theoretical\nmistake that could plausibly happen than one that actually happens and warrants\nremoving features, as was chosen in Python.\n\nAnyways, the let function in this module gives you something very close to that\nability in other languages. A few examples:\n\n.. code-block:: python\n\n if let(name = longInstanceName.longAttributeName):\n ...\n\n # Yes, db.fetch_results() should just return a generator. No, it doesn't.\n while let(results = db.fetch_results()):\n ...\n\n if let(count = len(nameValuePair)) != 1:\n raise Exception('Bad amount: {}'.format(count))\n\nCopyright\n---------\nThis software is Copyright (c) 2016 Taylor Marks .\n\nSee the bundled LICENSE file for more information.", "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/TaylorSMarks/let", "keywords": "let assign assignment var variable conditional if while return", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "let", "package_url": "https://pypi.org/project/let/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/let/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/TaylorSMarks/let" }, "release_url": "https://pypi.org/project/let/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Assign variables wherever, whenever you want.", "version": "1.0.1" }, "last_serial": 1977338, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1d73cc545f01cb6a460b5e492097256b", "sha256": "09d9ffb48472902c3589c7a324801a108dffca1174cb7b9f944737b08d284b9f" }, "downloads": -1, "filename": "let-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1d73cc545f01cb6a460b5e492097256b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3515, "upload_time": "2016-02-07T21:10:54", "url": "https://files.pythonhosted.org/packages/d8/2c/72efff5f602fbda34000189a8212d64e721c35943d3ba822ad123665ef43/let-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "e9c02496172c3614feb7a957b0372420", "sha256": "e9908eb4c4cddd6c58b3ed7346e1b26fb37da95d0071f04615f1d662495c732b" }, "downloads": -1, "filename": "let-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e9c02496172c3614feb7a957b0372420", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3783, "upload_time": "2016-02-26T03:08:46", "url": "https://files.pythonhosted.org/packages/9c/65/a89c6733476523c85c17c717d28bfd333e9b00c0cd71019d342e046d5179/let-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9c02496172c3614feb7a957b0372420", "sha256": "e9908eb4c4cddd6c58b3ed7346e1b26fb37da95d0071f04615f1d662495c732b" }, "downloads": -1, "filename": "let-1.0.1.tar.gz", "has_sig": false, "md5_digest": "e9c02496172c3614feb7a957b0372420", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3783, "upload_time": "2016-02-26T03:08:46", "url": "https://files.pythonhosted.org/packages/9c/65/a89c6733476523c85c17c717d28bfd333e9b00c0cd71019d342e046d5179/let-1.0.1.tar.gz" } ] }