Operator Overloading in Python: All you need to know to get started mastering OOP and Python Classes



Want to understand non-trivial Python source code? Looking to take your knowledge and ability with Python Classes further? In this tutorial I’ll introduce you to operator overloading and how to manipulate Python’s syntax to make the classes you make flexible, robust and more like Python’s built-in types.

Introduction 0:00
__init__() 0:15
What it means to overload an operator 0:54
__repr__ 1:19
__repr__ vs __str__ and when each is invoked 1:46
__add__ and binary operators 2:34
__radd__ and…

, , , , , , ,

4 thoughts on “Operator Overloading in Python: All you need to know to get started mastering OOP and Python Classes

  1. If you've found this useful in anyway, I'd really appreciate sharing it where you can so that more people can enjoy this resource! Watch out for a personal video I'm making on my own journey and how I changed career in my 30s from boring monotony to an exciting software engineering role. If ever you needed motivation or wanted my own specific advice on how to become a self-taught developer, then you make sure you don't miss it. Will be available next week!

Leave a Reply

Your email address will not be published. Required fields are marked *