Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAzamat Murzabayev
2,542 PointsDo we have to call all the functions like a dunder? For example, def __add__
The title says it all.
1 Answer
Steven Parker
231,275 PointsThe "dunder" syntax is only used for special-case functions that the system will automatically invoke when certain operations are performed (in this example, when a "+" operator is used).
it is "best practice" to not use that syntax when creating your own functions for other purposes.