Phantom argument within Classes

Screen Link: https://app.dataquest.io/m/352/object-oriented-python/6/understanding-self
Your Code: Enclose your code in 3 backticks like this to format properly: your code

After going through this lesson I am still pretty confused about the ‘self’ argument within defining a method. I am not exactly sure where I am confused at, I just can’t seem to wrap my head around why it’s necessary to include it and why an error returns if you don’t.

I understand that the ‘phantom object’ is the object itself, I just don’t understand why that is.

Does anyone have alternate resources on self I can read up on? Or just help me understand it here :slight_smile:

Thanks again!

This article actually helped to clarify a bit for me: https://medium.com/quick-code/understanding-self-in-python-a3704319e5f0

3 Likes

Hi @burnsdillion,

I hope this helps:

Best,
Sahil

5 Likes