Re: Missing Something Simple

2005-07-12 Thread John Abel
harold fellermann wrote: > >so, if I understand you right, what you want to have is a list of >mutable objects, whose value you can change without changing the >objects' >references. > > Yes! >class Proxy : > def __init__(self,val) : self.set(val) > def set(self,val) : self.val = v

Re: Missing Something Simple

2005-07-12 Thread harold fellermann
>>> I have a list of variables, which I am iterating over. I need to set >>> the value of each variable. My code looks like: >>> >>> varList = [ varOne, varTwo, varThree, varFour ] >>> >>> for indivVar in varList: >>>indivVar = returnVarFromFunction() >>> >>> However, none of the variables in

Re: Missing Something Simple

2005-07-12 Thread Fuzzyman
Hello John, John Abel wrote: > harold fellermann wrote: > > >Hi, > > > > > > > >>I have a list of variables, which I am iterating over. I need to set > >>the value of each variable. My code looks like: > >> > >>varList = [ varOne, varTwo, varThree, varFour ] > >> > >>for indivVar in varList: > >

Re: Missing Something Simple

2005-07-12 Thread Thomas Guettler
Am Tue, 12 Jul 2005 14:44:00 +0100 schrieb John Abel: > Hi, > > I have a list of variables, which I am iterating over. I need to set > the value of each variable. My code looks like: > > varList = [ varOne, varTwo, varThree, varFour ] > > for indivVar in varList: > indivVar = returnVarFr

Re: Missing Something Simple

2005-07-12 Thread John Abel
>have been declared before being used in the list. Basically, I'm after >the Python way of using deferencing. > > OK, that should say dereferencing. J -- http://mail.python.org/mailman/listinfo/python-list

Re: Missing Something Simple

2005-07-12 Thread John Abel
harold fellermann wrote: >Hi, > > > >>I have a list of variables, which I am iterating over. I need to set >>the value of each variable. My code looks like: >> >>varList = [ varOne, varTwo, varThree, varFour ] >> >>for indivVar in varList: >>indivVar = returnVarFromFunction() >> >>However,

Re: Missing Something Simple

2005-07-12 Thread harold fellermann
Hi, > I have a list of variables, which I am iterating over. I need to set > the value of each variable. My code looks like: > > varList = [ varOne, varTwo, varThree, varFour ] > > for indivVar in varList: > indivVar = returnVarFromFunction() > > However, none of the variables in the list ar

Missing Something Simple

2005-07-12 Thread John Abel
Hi, I have a list of variables, which I am iterating over. I need to set the value of each variable. My code looks like: varList = [ varOne, varTwo, varThree, varFour ] for indivVar in varList: indivVar = returnVarFromFunction() However, none of the variables in the list are being set.