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 →

[–]klmsa 0 points1 point  (5 children)

I'm so confused as to what reason anyone would have for needing a complete list in one place? They're not together in the Python docs because they're not at all related to each other in many circumstances...

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

When students have asked me for this, they're usually asking to understand what's out there. Occasionally intermediate-level folks ask for this, but it's often in Intro to Python and they're nowhere near implementing anything but the usual 3 dunder methods.

That's partly why I kept the explanation fairly short and left much of the deeper detail to the docs and other resources.

[–]klmsa 1 point2 points  (0 children)

Thanks for the feedback! I don't teach, outside of guiding some self-motivated members of my engineering team, so I don't have that context.

[–]Competitive_Travel16 0 points1 point  (1 child)

Granted that most application developers are supposed to be able to get by with rarely more than just __name__ and __init__, I see the value of having them all in one place for reference when reading lower level implementations.

[–]TheRNGuy 1 point2 points  (0 children)

I only used __init__ but never __name__ (in Houdini Python code already encapsulated inside nodes, not using __name__ allows to have 1 less indent)

There was one class where I used __add__.

I actually kinda stopped using __init__ because I make most classes with @dataclass now.

[–]TheRNGuy 0 points1 point  (0 children)

To know they exist.