| Home | Trees | Index | Help |
|---|
| Package tp :: Package client :: Package pyscheme :: Module environment |
|
Environment stuff. Exercise 4.11 asks us to develop an alternative environment implementation. This is an implementation of environments that uses a chained list of Python dictionaries.
| Function Summary | |
|---|---|
addBindingToFrame(var,
val,
frame)
| |
defineVariable(var,
val,
env)
| |
enclosingEnvironment(env)
| |
Extends an environment with a new set of bindings. | |
firstFrame(env)
| |
lookupVariableValue(var,
env)
| |
Note: here I diverge from SICP's implementation: instead of using a cons, I use a Python list. | |
setVariableValue(var,
val,
env)
| |
| Variable Summary | |
|---|---|
str |
__license__ = 'MIT License'
|
list |
THE_EMPTY_ENVIRONMENT = []
|
| Function Details |
|---|
extendEnvironment(var_pairs, val_pairs, base_env)Extends an environment with a new set of bindings. Extended to support Scheme's dotted notation for varargs. |
makeFrame(var_pairs, val_pairs)Note: here I diverge from SICP's implementation: instead of using a cons, I use a Python list. The selectors frameVariables() and frameValues() reflect this. |
| Variable Details |
|---|
__license__
|
THE_EMPTY_ENVIRONMENT
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Fri Jan 1 08:00:27 2010 | http://epydoc.sf.net |