8 ms·
Because, what, Python doesn’t have any language details related to method lookup that might require a sentence or two of technical explanation? __getattr__, __
by anderskaseorg 4y ago
Because, what, Python doesn’t have any language details related to method lookup that might require a sentence or two of technical explanation? __getattr__, __getattribute__, __get__, base classes, metaclasses, __mro__, __mro_entries__, __dict__, __slots__, __call__, bound and unbound methods—none of this has ever confused someone looking at it for the first 3–4 times?
I assume you’re going to reply that you don’t need to think about all this when writing most Python. And that’s true of most Rust too. Don’t get me wrong, Rust does have some unique complexity that Rust programmers need to learn in exchange for its unique safety guarantees—but method lookup isn’t where the complexity is.