Re: [Tutor] Doubt with classes

2006-01-21 Thread Alan Gauld
swaroop = Person('Swaroop') swaroop.sayHi() swaroop.howMany() kalam = Person('Abdul Kalam') kalam.sayHi() kalam.howMany() swaroop.sayHi() swaroop.howMany() # MY OUTPUT (Initializing Swaroop) Hi, my name is Swaroop. I am the only person here. (Initializing Abdul K

Re: [Tutor] Doubt with classes

2006-01-20 Thread Kent Johnson
Edgar Antonio Rodríguez Velazco wrote: > Hi everybody, > I've been reading the chapter of classes of Byte of Python by Swaroop. > There's an example with classes (11.4) that is below: The example is depending on Person.__del__() being called on swaroop and kalam when the intepreter exits. The Py

[Tutor] Doubt with classes

2006-01-20 Thread Edgar Antonio Rodríguez Velazco
Hi everybody, I've been reading the chapter of classes of Byte of Python by Swaroop. There's an example with classes (11.4) that is below:   # class Person:'''Represents a person.'''population = 0 def __init__(self, name):'''Initializes the person's data.