Steven W. Orr wrote:
> I want to indirectly change the value of a variable.
>
> #! /usr/bin/python
> foo = [44]
> bar = foo
> bar[0] = 55
> print 'bar = ', bar
> print 'foo = ', foo
>
> This works fine.
>
> bar = [55]
> foo = [55]
>
> But I want to do the same with a class value.
>
> #! /us
Steven W. Orr a écrit :
> I want to indirectly change the value of a variable.
>
Are you sure this is the correct formulation of your problem ?
> #! /usr/bin/python
> foo = [44]
> bar = foo
> bar[0] = 55
> print 'bar = ', bar
> print 'foo = ', foo
>
> This works fine.
>
> bar = [55]
> foo =