Why __init__(self, ....)?


Why is "self" even necessary, since it's there by default?

Replace this line with your code.


Self isn't there by default. The first argument is always the object instance, yes; however, it doesn't have to be called self. You could call it anything you like but it's convention is to call it self. It helps with readability if nothing else.

As for why do we have to explicitly state self? Here is what Guido van Rossum has to say:


very enlightening! Thanks for taking the time to respond.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.