Object Orientation

So the last thing my Python book got into was Object Orientation, which scared me. Considerably.

Objet orientation is not something I have ever had to deal with before, and it isn’t exactly . . . straightforward.

To the lay person, such as I, object orientation means the orientation, and the manipulation, of objects you can see. But that is wrong. From what I understand, objects aren’t GUI-like things, but instead are things like strings, lists and floats. I thought those things were classes, but apparently they’re both.

>>> 'abc'.upper()

According to the book, the string, abc, is the object. It then infers that the method, upper, is the orientation of the object. In this case, a copy of the string, but in uppercase.

If that is the case, then I like the fact that I can manipulate a string simply by adding a method to the end of it, but I repeat my earlier point, it isn’t exactly straightforward. Perhaps it’s just the explanation?

Author: Dan

Share This Post On