This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

-- 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 install. There are testcases you can run with 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.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dynscope-0.1-py2.6.egg (9.1 kB) Copy SHA256 Checksum SHA256 2.6 Egg Dec 16, 2010
dynscope-0.1.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Dec 16, 2010

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting