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 Martin.Teichmann
Recipients Martin.Teichmann
Date 2021-05-12.13:09:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620824977.65.0.255343602515.issue44115@roundup.psfhosted.org>
In-reply-to
Content
Currently, fraction.Fractions can be generated from floats via their as_integer_ratio method. This had been extended to also work with the Decimals class. It would be more generic - and IMHO more Pythonic - to just allow any data type, as long as it has an as_integer_ratio method.

As an example, this allows numpy floats to be converted into fractions.
History
Date User Action Args
2021-05-12 13:09:37Martin.Teichmannsetrecipients: + Martin.Teichmann
2021-05-12 13:09:37Martin.Teichmannsetmessageid: <1620824977.65.0.255343602515.issue44115@roundup.psfhosted.org>
2021-05-12 13:09:37Martin.Teichmannlinkissue44115 messages
2021-05-12 13:09:37Martin.Teichmanncreate