class A:
def x ( self ):
print( self.__class__ )
class B ( A ):
pass
b = B()
b.x()
In the above situation, is there any way for the method x
to get a reference to class A
instead of B
? Of course simply writing print( A )
is not allowed, as I want to add some functionality with a decorator that needs the class A
(and as I can't pass A itself to the decorator directly, as the class doesn't exist yet at that point).