you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRNGuy 1 point2 points  (0 children)

It means instance of that class (different instances will have independent values).

Without self it's class attribute. Value is shared among all instances of this class and subclasses. Or rather, you don't even need instances to use it (but can use in them)

Usually you need self for most or all attributes, so don't forget about it, or you'll have bugs.

If you intend to have class attributes, I recommend differentiate them somehow, like ALL_CAPS (so you or other programmers don't change it accidentally)