[Python-Dev] PEP 560: bases classes (original) (raw)

Ethan Furman ethan at stoneleaf.us
Thu Nov 16 12:58:59 EST 2017


On 11/16/2017 04:22 AM, Ivan Levkivskyi wrote:

On 16 November 2017 at 07:56, Nick Coghlan wrote:

Jim also raised an important point that needs clarification at the spec level: given multiple entries in "orig_bases" with mro_entries methods, do all such methods get passed the same orig_bases tuple? Or do they receive partially resolved ones, such that bases listed before them have already been resolved to their MRO entries by the time they run. Yes, they all get the same initial bases tuple as an argument. Passing updated ones will cost a bit more and I don't think it will be needed (in the worst case a base can resolve another base by calling its mro_entries manually). I will clarify this in the PEP.

If the extra complexity is to:

And each method is passed the same original tuple (without other methods' updates) then don't we end up in a situation where we can have duplicates base classes?

-- Ethan



More information about the Python-Dev mailing list