HELP : class and variables

vincent delft vincent_delft at yahoo.com
Mon Sep 1 12:01:22 EDT 2003


Sorry if my question is stupid.
I've missed something with classes. 
Can you explain the following ?
class test:
  var1=1
  var2=2
  res=var1+var2

t=test()
print t.res
>> 3
t.var1=6
print t.res
>> 3

??????????????????
I though that everithing is memory zones.
Why it's not 8 ?

Thanks




More information about the Python-list mailing list