I have problem updating attributes in a python class, I give a small example.
#!/usr/bin/python
# -*- coding: utf-8 -*-
class myClass():
def __init__(self):
self.s=0
self.procedure()
def procedure(self):#{{{
s=self.s
print s
self.operation()
print s
def operation(self):#{{{
s=self.s
s+=1
self.s=s
print "o:",self.s
c=myClass()
then output
0
o: 1
0
why the last number is 0 and not 1 ?