class foo:

    def __init__(self):
        self.var_a = 2
self.var_b = 3

def __call__(self, x):
    return self.var_a + self.var_b + x
localClosure = foo()
a = localClosure(1)
localClosure.var_a = 0
b = localClosure(1)
Modify bound variables of a closure in Python