Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

>  Nor will it achieve world peace.

Please watch the tone. It is borderline abusive and dismissive.

> we can invoke the attached as best_fraction(Fraction("0.001"),
> Fraction("0.0005"), Fraction("0.0015")) to get the output
> Fraction(1, 1000).

-1 I am solidly against this.  The other inputs to Fraction() are exact 
conversions.  The proposal works against a core concept behind the fraction 
module. 

Also, my expectation for Fraction("0.0015") would be to give Fraction(3, 2000), 
the same as would be given by Fraction(Decimal("0.0015")).

> But if it solves enough use cases then it is worth discussing, yes?

Perhaps this tracker issue should be closed and moved to python-ideas.  The 
notions are currently too immature to warrant more core developer time.

Also, it would be nice to have research into what other languages and libraries 
do for fractional approximations of decimal strings.

----------

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

Reply via email to