class A(object):
    answer = 42

def add(self, a, b):
    """ ``self`` is received explicitely. """
return A.answer + a + b
a = A()
print(a.add(1, 2))
print(a.answer)
Static variable inheritance in Python