def make_A():
    private = {'a': 1, 'b': 2, 'z': 26}


class A:

    def __init__(self):
        self.catch = 100
private['a'] = 2

def foo(self):
    print(private['a'])
return A
A = make_A()
a = A()
a.foo()
Data Hiding in Python Class