Jan Kaliszewski <z...@kaliszewski.net> added the comment:
So the current (after the aforementioned commit) form of the description is: A dotted lookup such as ``super(A, a).x`` searches ``obj.__class__.__mro__`` for a base class ``B`` following ``A`` and then returns ``B.__dict__['x'].__get__(a, A)``. If not a descriptor, ``x`` is returned unchanged. I guess here ``obj`` was supposed to be ``a``. But is the description correct when it comes to what class is used where? I.e., shouldn't it be rather something along the lines of the following: A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an instance of ``A`` of some other subclass of ``A``) searches ``A.__mro__`` for a base class ``B`` whose `__dict__` contains name ``"x"`` and then returns ``B.__dict__['x'].__get__(obj, type(obj))``. If ``B.__dict__['x']`` is not a descriptor, it is returned unchanged. *** Ad my comment #2 -- yes, it became groundless with time... Minor explanation: when I reported this issue in 2015, the signature of `object.__get__` was documented just as "__get__(self, instance, owner)" (see: https://docs.python.org/3.5/reference/datamodel.html#implementing-descriptors); that's why I wrote about an inconsistency. ---------- status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue20751> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com