[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: Upvalue question
From:       "Magnus Lie Hetland" <mlh () idi ! ntnu ! no>
Date:       2001-02-16 13:02:16
Message-ID: 009101c09818$b02621e0$fc6ff181 () ntnu ! no
[Download RAW message or body]

> The 3 lines of code were supposed to be run in a file, not interactively.
> When you run interactively, each line is a separate chunk and so 's' is
> local in the first one, but global in the second one, hence the error.

Oops. That's clearly what I've been doing wrong earlier as well :)

(I guess I'm used to the behaviour of the Python interpreter here,
as in many other cases ;)

Thanks for your help.

> --lhf


--

  Magnus Lie Hetland      (magnus at hetland dot org)

 "Reality is what refuses to disappear when you stop
  believing in it"                 -- Philip K. Dick



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic