nested scopes

Ben Hutchings ben.hutchings at roundpoint.com
Tue Feb 6 15:36:43 EST 2001


Michael Hudson <mwh21 at cam.ac.uk> writes:
<snip>
[about dynamic scoping]
> It's good when you're calling a function (call it A) that calls
> another function (call this one B) that has parameterizable behaviour,
> because A doesn't have to put all of B's parameters in its argument
> list - you get B to read these paramters from special (ie. dynamically
> scoped) variables and bind them around your call to A.  Can't think of
> a real good example now, I'm afraid.  The Common Lisp printer uses
> special variables extensively.
<snip>

If you consider Unix processes as functions, then a process's
environment is its dynamic scope.  There are many interesting uses for
environmental variables.

-- 
Any opinions expressed are my own and not necessarily those of Roundpoint.



More information about the Python-list mailing list