Python internally optimizes repeated attribute access through various caching mechanisms, particularly on type objects, to avoid re-computing the full lookup path for frequently accessed attributes.
Open the full topic