SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 106 Python

gh-121797: Add class method Fraction.from_number() (GH-121800)

It is an alternative constructor which only accepts a single numeric argument.
Unlike to Fraction.from_float() and Fraction.from_decimal() it accepts any
real numbers supported by the standard constructor (int, float, Decimal,
Rational numbers, objects with as_integer_ratio()).
Unlike to the standard constructor, it does not accept strings.
S
Serhiy Storchaka committed
b52c7306ea4470f9d7548655c2a1b89a07ff5504
Parent: 66b3922
Committed by GitHub <noreply@github.com> on 10/14/2024, 7:54:59 AM