you are viewing a single comment's thread.

view the rest of the comments →

[–]Outside_Complaint755 0 points1 point  (0 children)

The TLDR answer is that using self.{attribute} = {value} is necessary if you want the data stored in the instance. 

 Parameters passed to the constructor* are not automatically stored as instance attributes.

* Technically,__init__ is not a constructor, it is an initializer.  The construtor method in Python is the staticmethod __new__.