Re: dynamically creating variables

2006-03-03 Thread James Stroud
Crutcher wrote: >>Is it possible to do something like that? > > > No, you can't change the binding of variables in your calling space. > Unless your calling space is global py> def doit(): ... globals()['wilma'] = 'pebbles' ... py> doit() py> wilma 'pebbles' But that would be crazy. -- htt

Re: dynamically creating variables

2006-03-03 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I am writing a parser and I have a routine that can digest > a series of tokes: > > def digest(*args) > > I use it like this: digest("FOR", "IDENT", "EQ", "INTVAL", "COLON"). > This part works fine. My digest function returns a list of the values > associated with each

Re: dynamically creating variables

2006-03-03 Thread Crutcher
> Is it possible to do something like that? No, you can't change the binding of variables in your calling space. -- http://mail.python.org/mailman/listinfo/python-list