Message241340
What happens if `self.numerator / self.denominator` returns another `Rational` instance? If I create `MyRational` and `MyInteger` classes, such that the quotient of two `MyInteger` instances is a `MyRational` instance and the numerator and denominator of a `MyRational` instance are both `MyInteger` instances, this suggestion would lead to an infinite recursion. OTOH, I agree that *something* needs to be fixed here, since having `__float__` return a `MyRational` instance is definitely wrong. |
|
Date |
User |
Action |
Args |
2015-04-17 16:07:59 | mark.dickinson | set | recipients:
+ mark.dickinson, wolma |
2015-04-17 16:07:59 | mark.dickinson | set | messageid: <1429286879.31.0.954931714688.issue23975@psf.upfronthosting.co.za> |
2015-04-17 16:07:59 | mark.dickinson | link | issue23975 messages |
2015-04-17 16:07:59 | mark.dickinson | create | |
|