Problem with class variables
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Thu Mar 29 09:43:05 EDT 2007
In <slrnf0nfph.8f9.f98dawa at remote1.student.chalmers.se>, Dag wrote:
> I have a problem which is probaly very simple to solve, but I can't
> find a nice solution.
> I have the following code
>
> class Test:
> def __init__(self):
> self.a=[1,2,3,4]
> self.b=self.a
self.b = list(self.a)
BTW this is about instance variable, not class variables.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list