@matryoshka
class outer(object):
    answer = 42


class inner(object):

    def __call__(self):
        print(self.answer)
outer.inner()()
Nested Python class needs to access variable in enclosing class