Why is a class considered an object?
A class is a blueprint of an object. It tells what the object knows(instance variable) and what it does(methods/functions/procedures). Please refer to http://oreilly.com/catalog/hfjava2/chapter/ch02.pdf, it may be useful too
I still don't see how being a blueprint of an object qualifies it as an object itself. The instance is manipulable by functions and methods described by the class -- the class itself is not. I'm clearly missing something. Also, that link seems to be broken.
http://docs.python.org/tutorial/classes.html#classes first you should read through the Class section of the tutorial (link above) which is included in the docs that should have been installed on you computer in windows and i imagine they are a part of unix installs. from IDLE you can access the docs on your computer with F1. My take - when you 'run' a module, Python makes an object of each class whether it is instantiated or not. Even if you do not instantiate the class, you can manipulate/mutate/change/access that object's attributes. An object is created from the class itself (the class definition) which is separate from any instantiations. Which lecture are you on? I think lecture 16 has an example of this concept.
In python everything is an object. That's just the language paradigm python chose to go with. Having blueprints be objects makes it easy to manipulate the code at run time which has some advantages (and drawbacks).
It's an object because of the fact that you call it directly in the code, as opposed to having to define all the properties everytime you want to make a similar object--?
Thanks, you guys have been helpful.
Join our real-time social learning platform and learn together with your friends!