decimal = pyimport "decimal" .Fraction: ClassType .Fraction <: Eq .Fraction <: Hash .Fraction <: Ord .Fraction. numerator: Int denominator: Int __call__: \ ((numerator := Int, denominator := Int) -> .Fraction) \ and ((string: decimal.Decimal) -> .Fraction) \ and (string: Str) -> .Fraction as_integer_ratio: (self: .Fraction) -> (Int, Int) from_float: (float: Float) -> .Fraction from_decimal: (decimal: decimal.Decimal) -> .Fraction limit_denominator: (self: .Fraction, max_denominator := Int) -> .Fraction __floor__: (self: .Fraction) -> Int __ceil__: (self: .Fraction) -> Int __round__: (self: .Fraction, ndights := Int) -> Int