Author bar.harel
Recipients David MacIver, bar.harel, benjamin.peterson, mark.dickinson, steven.daprano
Date 2015-09-27.14:03:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443362635.92.0.273196997428.issue25177@psf.upfronthosting.co.za>
In-reply-to
Content
Alright, this patch passed all tests.
I've changed the function sum to include a new parameter called fraction which decides whether to return a fraction or not. It might be useful in more scenarios due to the fact fractions are more accurate.
I'm still unsure why not to support mixed types, as we can just again, return a mixed type as fraction but I left it like this in order not to cause unexpected behavior. I still think however that supporting mixed types should be fine as the bottleneck regarding precision is fraction, which is used as the base for conversion anyway.
I've added a few doctests on the way including the float max and min, which did not previously pass on the current implementation, and changed the unittest to match.
History
Date User Action Args
2015-09-27 14:03:56bar.harelsetrecipients: + bar.harel, mark.dickinson, benjamin.peterson, steven.daprano, David MacIver
2015-09-27 14:03:55bar.harelsetmessageid: <1443362635.92.0.273196997428.issue25177@psf.upfronthosting.co.za>
2015-09-27 14:03:55bar.harellinkissue25177 messages
2015-09-27 14:03:55bar.harelcreate