Bug report
Bug description:
Hi, I discovered the following bug in the init of the Fraction object:
from fractions import Fraction
print(Fraction(0.5) == Fraction(0.5, 1))
Expected Output:
Actual Output:
*** TypeError: both arguments should be Rational instances
Similarly:
from fractions import Fraction
print(Fraction(0.5, 0.5) == Fraction(1))
Expected Output:
Actual Output:
*** TypeError: both arguments should be Rational instances
Tested on
Python 3.11.7
Python 3.13.4
CPython versions tested on:
3.11, 3.13
Operating systems tested on:
macOS
Bug report
Bug description:
Hi, I discovered the following bug in the init of the Fraction object:
Expected Output:
Actual Output:
Similarly:
Expected Output:
Actual Output:
Tested on
CPython versions tested on:
3.11, 3.13
Operating systems tested on:
macOS