I'm trying to learn Python, and know C++. I have a slight confusion regarding the meaning of "object" in python. Here's what I've concluded so far:
When we say "object" in C++, it means an instance of a class. e.g. class x{.......}; x ob1; // here ob1 is an object. but, for; int x; // x is NOT an object, it is a *variable* while in python, from what i've understood so far, >>> x=5 implies that there's a memory allocation (called object) that holds the value 3, and "x" is the variable (or name) that is used to refer to it. Further, in python, *everything *is an object, while in C++, only*instances of a class * are called objects. So does the term *Object * change its meaning when we shift the context from C++ to python?? This is a little confusing, can someone clear it up?? -- Regards, Ashwini
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor