• 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
..
cgi Loading commit data...
classes Loading commit data...
comparisons Loading commit data...
curses Loading commit data...
embed Loading commit data...
imputil Loading commit data...
md5test Loading commit data...
metaclasses Loading commit data...
newmetaclasses Loading commit data...
parser Loading commit data...
pdist Loading commit data...
pysvr Loading commit data...
rpc Loading commit data...
scripts Loading commit data...
sockets Loading commit data...
threads Loading commit data...
tix Loading commit data...
tkinter Loading commit data...
xml Loading commit data...
zlib Loading commit data...
README Loading commit data...