[Python-ideas] MRO local precedence ordering revisited
Ned Batchelder
ned at nedbatchelder.com
Thu Dec 10 15:43:01 EST 2015
On 12/10/15 3:03 PM, Stephan Sahm wrote:
> (B, mixin, A, mixin, object)
>
> or in the simpler, more trivial version
>
> (B, object, A, object)
>
> As you haven't mentioned this as a possibility at all, I guess having
> a class twice in this list produces some weird behaviour I do not know
> about yet - if someone can point out, that would be great.
The MRO is a list of classes to search for attributes. There's no point
in having a class listed twice. The second occurrence would never be
used, because any attribute it could provide would be found on the first
occurrence of the class.
--Ned.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20151210/43f79903/attachment.html>
More information about the Python-ideas
mailing list