I very much like the Don't Repeat Yourself (DRY) principle, and as one instance of it, I don't like to use a class's name within its definition. (If I wanted to change the class name, I would also have to change all of its occurrences within the class definition, where I might forget one.)
Now the typical idiom to accessing superclass attributes I read in the docs contains the class name, like in
class A(object):
def method(self):
print('Hi!')
class B(A):
def method(self):
super(B, self).method() # fixed reference to B, not DRY
Using "type(self)" or "self.__class__" instead will lead to infinite recursion when subclassing B.
Do I have to skip DRY in this case? Or is there some other magic attribute which - inside the definition of the subclass - refers to that subclass?