Bar Harel added the comment:

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.

----------
Added file: http://bugs.python.org/file40597/Issue25177_rev2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25177>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to