Yesterday I started on chapter 10 of the Python 3 course, which is on classes, and I’m completely baffled. I’ve done all the preceding chapters and challenges and sure, some concepts or exercises took me longer than others, but the concepts were always explained in a way that made sense to me.
In this chapter, not so much. I can get by doing the exercises and I know what is expected of me here, and I kinda understand how it works so far. But I just cannot understand the underlying concepts at all.
I’m now on Instance Variables, part 9 of 14 exercises. Here the explanation states: “We’ve learned so far that a class is a schematic for a data type and an object is an instance of a class, but why is there such a strong need to differentiate the two if each object can only have the methods and class variables the class has? This is because each instance of a class can hold different kinds of data.”
… what? Just what? I do not begin to comprehend what they are trying to teach me here
Is there anyone here who can explain to me:
- why use classes at all? What do classes accomplish that functions can’t?
- is there a really down-to-earth, easy comparison to be made between a class and a real-life thing, just so I can understand it better?
- or is there a book, website, video where this is explained for the kind of total n00b I am?