from_float(flt)
This class method constructs a Fraction representing the exact value of flt, which must be a float. Beware that Fraction.from_float(0.3) is not the same value as Fraction(3, 10).
Note
From Python 3.2 onwards, you can also construct a Fraction instance directly from a float.
Please login to continue.