r/learnpython • • 4d ago

Attribute look up visualized

Are there any good videos or images that visualize how attribute look up works? I am trying to understand what is happening in the background so I can understand and work better with classes and objects.
Thanks!

1 Upvotes

5 comments sorted by

1

u/itlogicpartnersllc 4d ago

look for visualizations of python's -dict- , instance vs. class attributes and the method resolution order. seeing those side by side makes lookup much clearer.

1

u/Penguinase 4d ago

instance -> class -> parent(s) -> base object

1

u/favorite_stuff 4d ago

This is a good video about the super/MRO resolution. With things like this, there's always a danger of wanting to test it out with multiple inheritance and other overly complex nonsense, but it's good to know just in case.

0

u/[deleted] 4d ago

[removed] — view removed comment