I have been trying to understand classes. I have been studying from a book I picked up recently. I have two questions about them.
1. I saw in the book an assignment written like this: class HumanBeing: def makeName(self, name): *self.name = name* * * Why is it not written like this?: class HumanBeing: def makeName(self, name): * name = self.name* * * 2. Why use a class in the first place? What is the purpose of constructing a class instead of just writing a program with a bunch of functions? Thanks, Brandon
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor