Message 303790 - Python tracker (original) (raw)
The fractions module isn't easily extended to support this proposal. It was designed around a gcd() step and assumes integer numerators and denominators throughout. Also, the Fraction class is registered with numbers.Rational() which implies some specific behaviors including inoperability with various other classes.
In additionl, the standard library also doesn't yet support unevaluated rationals like SquareRoot(3). I suggest looking at the sympy module which may already have everything you need.