I have a python code like this.
File named mymodule.py
class MyBase(object):
pass
File named data.py
from mymodule import MyBase
class A:
class NestA(MyBase):
pass
class NestB(MyBase):
pass
class B:
class NestA(MyBase):
pass
class NestB(MyBase):
pass
if I have a = A.NestA (not it is referring to a class, a is not the object of class NestA but the class itself) how do I find out what nested class hierarchy does a belong to? a.name gives me NestA so that is not a problem. I want to find out what outer class NestA is part of, i.e class A or class B. How do I do it?