-- restructuredtext --
Dynamic Scope for Python
This package implements simple dynamic scope syntactic sugar for Python. It allows to (IMO elegantly) use dynamically scoped variables where you need them with a scheme-like semantic.
Install is quite standard:
easy_install dynscope
or just download the sources and run setup.py install. There are testcases you can run with setup.py test, too.
I test and work with it under Python 2.6.
How to use dynamically scoped variables
>>> from dynscope import flet, fluid >>> with flet(anton=5, berta=6): >>> print fluid.anton*fluid.berta >>> print fluid.anton*fluid.berta
The first print will print 30, the second one will raise an exception, since those variables are not defined.
There is a base-layer of fluid definitions (think of them as normal globals, only that they are per-thread or per-coroutine if using for example gevent with full patching) that you can use, too. But it’s often much better style to restrict fluids to the dynamic scope that actually expects them. Unrestricted globals are far more often the wrong choice than the right choice. But where you can make use of them is to set defaults for dynamically scoped variables so that functions can run outside flet scopes.
Metadata
Release files for dynscope 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dynscope-0.1.tar.gz | 4.0 kB | Without provenance | Details for dynscope-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynscope-0.1-py2.6.egg | Legacy Egg format | - | - | Details for dynscope-0.1-py2.6.egg |
Total release size: 13.1 kB
Release files / dynscope-0.1.tar.gz
| Download URL | dynscope-0.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5878c103b1512df0e9f62f45429b10ce495975d1cdd66227677ee7d0abeefbf5
|
|
BLAKE2b-256 checksum How to use checksums |
d9413115657757e019a749e9046794d841c2c5f58553947d1ed1f30d709dd42c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / dynscope-0.1-py2.6.egg
| Download URL | dynscope-0.1-py2.6.egg |
|---|---|
| Size | 9.1 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
86df643e3de5c20c7a1353adabbc525b3c792ab54682d9e66d87e88f18a71943
|
|
BLAKE2b-256 checksum How to use checksums |
31b9fe800af075376dbcb16f2b19e18a81e2a9d30f4ffe3082ea45072afd6f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dynscope 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.