Feb-02-2024, 07:56 AM
(Feb-01-2024, 07:54 AM)Gribouillis Wrote:(Feb-01-2024, 07:21 AM)akbarza Wrote: explain to me why Python acts as this.This is explained in the documentation of super
Documentation Wrote:The search starts from the class right after the type.In your case, the
For example, if __mro__ of object_or_type is D -> B -> C -> A -> object and the value of type is B, then super() searches C -> A -> object.__mro__
ofg
isgrandchild -> child1 -> child2 -> parent -> object
So in child1, super() finds child2 before parent.
hi, thanks for the reply
I think I read the segment of document about super() at least five