Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think I see the problem. You're using numerator for two things: the method numerator, and the num value.

IOW when __init__ gets executed, you're replacing the method .numerator() with the polynomial in the line "self.numerator = num". Change the name of the stored value and you should be fine.

I think I see the problem. You're using numerator for two things: the method numerator, and the instance variable holding the num value.

IOW when __init__ gets executed, you're replacing the method .numerator() with the polynomial in the line "self.numerator = num". Change the name of the stored value and you should be fine.