[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Upvalue question
- From: "Magnus Lie Hetland" <mlh@...>
- Date: Fri, 16 Feb 2001 14:02:16 +0100
> 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.
Magnus Lie Hetland (magnus at hetland dot org)
"Reality is what refuses to disappear when you stop
believing in it" -- Philip K. Dick