• Jeffrey Yasskin's avatar
    Add rational.Rational as an implementation of numbers.Rational with infinite · d7b00334
    Jeffrey Yasskin yazdı
    precision. This has been discussed at http://bugs.python.org/issue1682. It's
    useful primarily for teaching, but it also demonstrates how to implement a
    member of the numeric tower, including fallbacks for mixed-mode arithmetic.
    
    I expect to write a couple more patches in this area:
     * Rational.from_decimal()
     * Rational.trim/approximate() (maybe with different names)
     * Maybe remove the parentheses from Rational.__str__()
     * Maybe rename one of the Rational classes
     * Maybe make Rational('3/2') work.
    d7b00334
Adı
Son kayıt (commit)
Son güncelleme
..
Complex.py Loading commit data...
Dates.py Loading commit data...
Dbm.py Loading commit data...
README Loading commit data...
Range.py Loading commit data...
Rev.py Loading commit data...
Vec.py Loading commit data...
bitvec.py Loading commit data...