Problem with description of OO
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Practical Programming in Python |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Received this from a student:
Dear Prof. Brendan,
I’m having a lot of trouble with __init__ method, I have read the book and watched the podcasts and still don’t get it. I think my problem is that the book half defines a lot of things in a small space, and I can wrap my head around that.
In section 16.3 it says the __init__ method is called when the Point object is instantiated, in the previous section it says an object is like a variable but in a Class, like method is to function variable is to object. The book hasn’t defined instantiated, do I take the plain English meaning? It doesn’t make any sense, what “variable” of Point(), Point doesn’t have any. What does “variable of the class type mean”??? It never actually defines constructor….. Eng meaning?
Could you please explain to me in layman's term what the __init__ actually does, I feel bombarded me with cyclic terminology
Have added in a para that I think makes this clear.