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 rhettinger
Recipients Leengit, mark.dickinson, rhettinger, serhiy.storchaka, zach.ware
Date 2022-02-17.23:29:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645140570.57.0.432112907455.issue46780@roundup.psfhosted.org>
In-reply-to
Content
>  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.
History
Date User Action Args
2022-02-17 23:29:30rhettingersetrecipients: + rhettinger, mark.dickinson, zach.ware, serhiy.storchaka, Leengit
2022-02-17 23:29:30rhettingersetmessageid: <1645140570.57.0.432112907455.issue46780@roundup.psfhosted.org>
2022-02-17 23:29:30rhettingerlinkissue46780 messages
2022-02-17 23:29:30rhettingercreate