| 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.
| 2 | No.2 Revision |
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.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.