This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, wolma
Date 2015-04-17.16:07:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429286879.31.0.954931714688.issue23975@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-04-17 16:07:59mark.dickinsonsetrecipients: + mark.dickinson, wolma
2015-04-17 16:07:59mark.dickinsonsetmessageid: <1429286879.31.0.954931714688.issue23975@psf.upfronthosting.co.za>
2015-04-17 16:07:59mark.dickinsonlinkissue23975 messages
2015-04-17 16:07:59mark.dickinsoncreate