How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance h
You can simply use __qualname__ which stands for qualified name of a function or class
__qualname__
Example:
>>> class C: ... class D: ... def meth(self): ... pass ... >>> C.__qualname__ 'C' >>> C.D.__qualname__ 'C.D' >>> C.D.meth.__qualname__ 'C.D.meth'
documentation link qualname