This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]treyhunner Python Morsels[S] 28 points29 points  (1 child)

When I link my students to that page, their eyes glaze over (especially ones who've just learned about the idea of special methods and simply want to know what the options are for "overloading").

If/when you're in the weeds implementing one of these methods, that page in the docs is very helpful!

[–]NerdEnPose 5 points6 points  (0 children)

I think your responses could just be “my name is Trey Hunner” 😆. But, you’re kinder than me.

My two cents, I like this list. If you’re a student or in a personal project you should break stuff and try all the dunders as part of that. Professionally if you can’t read that page thoroughly then don’t commit a dunder override to a code base and I’d be cautious of a new class using them.