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

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.

----------

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

Reply via email to