python dynamic scoping question
Grzegorz Adam Hankiewicz
gradha at titanium.sabren.com
Mon Apr 21 17:30:12 EDT 2003
On 2003-04-21, Bjorn Pettersen <BPettersen at NAREX.com> wrote:
> You're correct! God, it's been a long time since I looked at
> it. What you're describing above (and described just as mystically
> in the TCL manuals) is simply call by reference (in the C++
> sense of the term).
Not really, because the called function doesn't require parameters if
you always want a specific variable to be set, like Julia asked for:
$ tclsh
% proc g {} { uplevel set x 5; return }
% set x
can't read "x": no such variable
% g
% set x
5
This can't be done in C portably, and is certainly not call by
reference. And please, do not send me copies of your public ansers.
--
Please don't send me private copies of your public answers. Thanks.
More information about the Python-list
mailing list