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
>>> 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
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:
> >
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
>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
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,
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
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.