[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Son of Lua - Sol
- From: "Chris Tavares" <ctavares@...>
- Date: Wed, 31 Jan 2001 14:36:09 -0800
Actually, the semantics here are identical to Python's - read goes to
"nearest" variable scope (local if there's a local value, global otherwise)
and writes go to local scope unless told otherwise.
Or am I misunderstanding how this works?
----- Original Message -----
From: "Edgar Toernig" <email@example.com>
To: "Multiple recipients of list" <firstname.lastname@example.org>
Sent: Wednesday, January 31, 2001 12:15 PM
Subject: Re: Son of Lua - Sol
> "Russell Y. Webb" wrote:
> > b = 10
> > c = 1
> > function test(x)
> > global c;
> > b = "this does not change the global";
> > c = "but this does";
> > print(10); -- this uses the read access to globals
> > end
> I thought about this myself. But it complicates the parser a lot.
> (Especially: a,b,c,d=foo4() where a and d are new locals, b an old
> local and c a global). And you may get some strange semantics.
> Are your patches anywhere to have a look at?
> Ciao, ET.