Python OOP Tutorial 5: Special (Magic/Dunder) Methods

In this Python Object-Oriented Tutorial, we will be learning about special methods. These are also called magic or dunder methods. These methods allow us to emulate built-in types or implement operator overloading. These can be extremely powerful if used correctly. We will start by writing a few special methods of our own and then look at how some of them are used in the Standard Library. Let’s get started.

Python Docs:

Python OOP 1 – Classes and Instances –
Python OOP 2 – Class Variables –
Python OOP 3 – Classmethods and Staticmethods –
Python OOP 4 – Inheritance –
Python OOP 5 – Special (Magic/Dunder) Methods –
Python OOP 6 – Property Decorators –

The code from this video can be found at:

If you enjoy these videos and would like to support my channel, I would greatly appreciate any assistance through my Patreon account:

Or a one-time contribution through PayPal:

If you would like to see additional ways in which you can support the channel, you can check out my support page:

Equipment I use and books I recommend:

You can find me on:
My website –
Facebook –
Twitter –
Google Plus –
Instagram –