Chapter 8: Magic methods

Summary

face Josiah Wang

The magic methods demonstrate how powerful objects can be. For example, you can easily modify the behaviour of an operator depending on what type of object it is, without even having to touch Python’s code. This way, you can extend codes very easily! These ideas will grow clearer as we delve even deeper into object-oriented programming!