The methods having two prefix and suffix underscores in the method name is called Magic Methods. They're special methods that you can define to add "magic" to your classes.
A Guide to Python's Magic Methodsarrow-up-right
Python Tutorial: Magic Methodsarrow-up-right
Last updated 6 years ago
Was this helpful?