Re: Globalize all variables in function without knowing names.

2009-07-27 Thread Tom
> Dictionaries are fundamental to Python and very useful. Not learning > about them before starting to write code is like not learning about the > accelerator pedal before starting to drive a car. Heh, I just looked at the actual tutorial for Dictionaries and I have to say they are very useful. Ba

Re: Globalize all variables in function without knowing names.

2009-07-26 Thread Steven D'Aprano
On Sun, 26 Jul 2009 15:07:08 -0700, Tom wrote: > Ah, thanks for that Dennis. I have a system already figured out where > the user manually pre-enters all the variables into a .py file, which > obviously isn't very efficient. The language isn't going to be used much > except by me, so I suppose I'l

Re: Globalize all variables in function without knowing names.

2009-07-26 Thread Tom
Ah, thanks for that Dennis. I have a system already figured out where the user manually pre-enters all the variables into a .py file, which obviously isn't very efficient. The language isn't going to be used much except by me, so I suppose I'll just work with that until I look more into dictionarie

Globalize all variables in function without knowing names.

2009-07-26 Thread Tom
Does anyknow know how to do this? The reason I'm asking is because I'm trying to make a mini-programming language for fun, and need to work with variables. The user types 'set NAME "DATA" ' or whatever else the variable is going to be called/contain. I have: def variablework(varname, varset):