[docs] [issue23674] super() documentation isn't very clear

Martin Panter report at bugs.python.org
Sat May 20 06:32:19 EDT 2017


Martin Panter added the comment:

Cheryl: see also Issue 25777 and Issue 20751, both about the “super binding” under Invoking Descriptors.

Raymond: if you want to just pick parts of my patch, go for it. But I don’t understand your concern about explaining the MRO. I think it is important to explain which base classes are skipped, and which are searched. It is not just the type/subclass (super.__thisclass__) entry in the MRO that is skipped; this parameter determines the starting point, so the preceding entries are also skipped.

Another problem with referring to “getattr” is that it checks for instance attributes and custom __getattr__ and __getattribute__ implementations, but I don’t think “super” does any of that.

Looking at my patch now, I would propose that the exception message only be changed in the current (3.7) branch.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23674>
_______________________________________


More information about the docs mailing list