Dynamic Attribute Lookup: MRO Traversal

Before a method can be called, Python must dynamically locate the method attribute within the object's Method Resolution Order (MRO). This involves dictionary lookups for each class in the MRO, which is significantly slower than direct memory access in compiled languages like C.

Sources

Open the full topic