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 paul.moore
Recipients mark.dickinson, paul.moore, wolma
Date 2015-04-20.12:50:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429534226.25.0.329461268888.issue23975@psf.upfronthosting.co.za>
In-reply-to
Content
Is it not reasonable to simply say that implementations of numbers.Rational which allow the numerator and denominator to have types for which true division doesn't return a float, have to provide their own implementation of __float__()?

It's certainly less convenient, and probably surprising for users, but the alternative is trying to work around broken integer types - after all numbers.Complex.__truediv__ says "Should promote to float when necessary" in the docstring, which to me says that a type where a/b doesn't return a float doesn't conform to the numeric tower.
History
Date User Action Args
2015-04-20 12:50:26paul.mooresetrecipients: + paul.moore, mark.dickinson, wolma
2015-04-20 12:50:26paul.mooresetmessageid: <1429534226.25.0.329461268888.issue23975@psf.upfronthosting.co.za>
2015-04-20 12:50:26paul.moorelinkissue23975 messages
2015-04-20 12:50:26paul.moorecreate