Is it possible in Python make a static attribute of class which will be same for all instances (objects) of that class, they all will use same reference to that attribute without creating their own attributes.
For example :
class myClass:
__a = 0
def __init__(self, b, c):
self.b = b
self.c = c
def increase_A(self):
self.__a += 1
return
def get_A(self):
return self.__a
So if I have
myObject1 = myClass(1,2)
myObject2 = myClass(3,4)
myObject2.increase_A()
print myObject1.get_A()
will show one and not zero, couse they share the same variable ?