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 jdemeyer, mark.dickinson, rhettinger, serhiy.storchaka, stutzbach
Date 2022-01-02.22:00:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641160813.01.0.849266202179.issue37836@roundup.psfhosted.org>
In-reply-to
Content
I don't think this is a door we should open:

   >>> Fraction(3.5, 2.5)
   Fraction(7, 5)

This currently raises a useful exception:

   TypeError: both arguments should be Rational instances

That is especially helpful in avoiding cases like this:

    >>> Fraction(1.1, 3.3)
    Fraction(2476979795053773, 7430939385161318)

If that output is desired, the two conversions should be explicit.

    >>> Fraction(1.1) / Fraction(3.3)
    Fraction(2476979795053773, 7430939385161318

I recommend rejecting this feature request as being more likely to be hazardous than helpful.
History
Date User Action Args
2022-01-02 22:00:13rhettingersetrecipients: + rhettinger, mark.dickinson, stutzbach, serhiy.storchaka, jdemeyer
2022-01-02 22:00:13rhettingersetmessageid: <1641160813.01.0.849266202179.issue37836@roundup.psfhosted.org>
2022-01-02 22:00:12rhettingerlinkissue37836 messages
2022-01-02 22:00:12rhettingercreate