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

the above code act like this:
>>> I = my_int()
>>> I
0

I want it to be like this:
>>> I = my_int()
>>> I
5

Please, if you know a solution, help me out!

-- 
With best wishes!
Shidai
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to