block-scopes


Nameblock-scopes JSON
Version 0.2.3 PyPI version JSON
download
home_page
SummaryBlock scopes in Python? Whaaaaaat?!
upload_time2023-01-21 21:49:34
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords cursed hack memory scoping variables
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🩺 `block-scopes`
_Block scoping in Python!_

[![PyPI - Version](https://img.shields.io/pypi/v/block-scopes.svg)](https://pypi.org/project/block-scopes)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/block-scopes.svg)](https://pypi.org/project/block-scopes)

-----

**Table of Contents**

- [Usage](#usage)
- [Installation](#installation)
- [License](#license)

## Usage

```python
from scopes import scope

before = "I'll be kept!"

with scope("keep_me", "keep_me_too"):
    keep_me = "Keep me!"
    lose_me = "Not me!"

    keep_me_too = "Also... me!"

assert "before" in locals()
assert "keep_me" in locals()
assert "keep_me_too" in locals()

assert "lose_me" not in locals()
```

## Installation

```console
pip install block-scopes
```

## License

`block-scopes` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "block-scopes",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "cursed,hack,memory,scoping,variables",
    "author": "",
    "author_email": "Joe Carpinelli <jdcarpinelli@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/60/830b7d07f180a1b62ed4dcb392e41af6e54ea67d3c793894863246b5242a/block_scopes-0.2.3.tar.gz",
    "platform": null,
    "description": "# \ud83e\ude7a `block-scopes`\n_Block scoping in Python!_\n\n[![PyPI - Version](https://img.shields.io/pypi/v/block-scopes.svg)](https://pypi.org/project/block-scopes)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/block-scopes.svg)](https://pypi.org/project/block-scopes)\n\n-----\n\n**Table of Contents**\n\n- [Usage](#usage)\n- [Installation](#installation)\n- [License](#license)\n\n## Usage\n\n```python\nfrom scopes import scope\n\nbefore = \"I'll be kept!\"\n\nwith scope(\"keep_me\", \"keep_me_too\"):\n    keep_me = \"Keep me!\"\n    lose_me = \"Not me!\"\n\n    keep_me_too = \"Also... me!\"\n\nassert \"before\" in locals()\nassert \"keep_me\" in locals()\nassert \"keep_me_too\" in locals()\n\nassert \"lose_me\" not in locals()\n```\n\n## Installation\n\n```console\npip install block-scopes\n```\n\n## License\n\n`block-scopes` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Block scopes in Python? Whaaaaaat?!",
    "version": "0.2.3",
    "split_keywords": [
        "cursed",
        "hack",
        "memory",
        "scoping",
        "variables"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d5c1119729eca2ff8279da4b349e8f22e521f6b3e2672ca57696c84c2a8651a",
                "md5": "0e9e549a48505f7f6187b03dac8ecee6",
                "sha256": "97bfe3f6e41e0813cd077a4ed927de580755945b36f2aa66c82ef5502c3f0b75"
            },
            "downloads": -1,
            "filename": "block_scopes-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0e9e549a48505f7f6187b03dac8ecee6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3279,
            "upload_time": "2023-01-21T21:49:33",
            "upload_time_iso_8601": "2023-01-21T21:49:33.510060Z",
            "url": "https://files.pythonhosted.org/packages/4d/5c/1119729eca2ff8279da4b349e8f22e521f6b3e2672ca57696c84c2a8651a/block_scopes-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed60830b7d07f180a1b62ed4dcb392e41af6e54ea67d3c793894863246b5242a",
                "md5": "e0fa1b26e3550849dfbb1f6008f92b31",
                "sha256": "3cbaf996b3811cf929d11a93321462cc9c2473d1bc6fa7dda0050cead3581eb6"
            },
            "downloads": -1,
            "filename": "block_scopes-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e0fa1b26e3550849dfbb1f6008f92b31",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3113,
            "upload_time": "2023-01-21T21:49:34",
            "upload_time_iso_8601": "2023-01-21T21:49:34.913391Z",
            "url": "https://files.pythonhosted.org/packages/ed/60/830b7d07f180a1b62ed4dcb392e41af6e54ea67d3c793894863246b5242a/block_scopes-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-21 21:49:34",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "block-scopes"
}
        
Elapsed time: 0.41519s