On Mar 8, 2005, at 22:10, Shidai Liu wrote:
Hi all,
I'll sum up a question as following:
def int5(): '''return 5''' return 5
class my_int(int): def __init__(self): self.id = int5() int.__init__(self, self.id) # FIXME: this line doesn't work
I'm not absolutely confident with inheritance in Python (nearly all of my serious OO work has been in Java), but shouldn't the call to the superclass's constructor be the very first statement of the subclass's constructor?
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
