In the Python Descriptor HowTo guide, it is written that:
A dotted lookup such as
super(A, obj).msearchesobj.__class__.__mro__for the base classBimmediately followingAand then returnsB.__dict__['m'].__get__(obj, A). If not a descriptor,mis returned unchanged.
This seems to suggest that the search for attribute m only happens in the __dict__ of class B, which is the base class immediately following A, however, I think it should happen in all of the base classes in the mro following A. Am I missing anything here?
The lookup is basically the usual algorithm, but with a couple of beginning steps skipped:
Look forminobj.__dict__.Look formintype(m).__dict__.min a class in the MRO oftype(m), starting with the class afterA.Once
mis found, then Python checks ifmis a descriptor. If it is,m.__get__is called and its return value is the result. Otherwise,mitself is the result.