Namespace promotion done right!
Project description
exalt provides a convenient way to dynamically create closures and bind them to a custom namespace. This is primarily useful for preserving an execution-context when calling into a different function.
Example
from exalt import promote
def baz():
return bar
def foo():
bar = "baz"
return promote(baz, **locals())()
print(foo())
——————————————————————————— ↓ ———————————————————————————
baz
Installation
pip3 install --user exalt
Disclaimer
exalt heavily relies on CPython implementation details and probably shouldn't be used in a production environment.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exalt-0.1.2.tar.gz.
File metadata
- Download URL: exalt-0.1.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4ede875580506c288524e199e3ef69b688dfb18073e06fe121569d164e8f8fa
|
|
| MD5 |
9ac9789b00592b747bfcf8b12b6defbc
|
|
| BLAKE2b-256 |
0390beecaced2ca141dfbafa713bba2909833a6142d15b49a6bf6e4d922488a2
|
File details
Details for the file exalt-0.1.2-py3-none-any.whl.
File metadata
- Download URL: exalt-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.10 CPython/3.7.1 Darwin/18.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d91272c1d1fb02f75c7cda3a0c4ba8da199a53586530cba325381e4d473a73d0
|
|
| MD5 |
9fbc6f6e2b82d6d0f035472eb347b84d
|
|
| BLAKE2b-256 |
676aa45bbc9663923ed9f23a2ee9911b687f02e1c9a35dd2faeb4360d9992769
|