Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Namespace promotion done right!

Project description

exalt


Python 3.7 Not production ready Travis status

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

This version
History Node

0.1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
exalt-0.1.2-py3-none-any.whl (7.3 kB) Copy SHA256 hash SHA256 Wheel py3
exalt-0.1.2.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page