0
magic methods
How can I use magic methods
2 Answers
+ 3
Magic methods are not meant to be invoked directly by you, but the invocation happens internally from the class on a certain action. For example, when you add two numbers using the + operator, internally, the __add__() method will be called. Built-in classes in Python define many magic methods.