About Rational Number (PEP 239/PEP 240)
Aahz
aahz at pythoncraft.com
Sun Dec 16 12:32:48 EST 2007
In article <413258d4-9349-47ff-8808-92fda5f13221 at s12g2000prg.googlegroups.com>,
George Sakkis <george.sakkis at gmail.com> wrote:
>
>Regardless, a builtin (or at least standard library) rational type
>would be nice to have. Of course folks that *really need* rationals
>are already using some 3rd party library, but for the rest of us it
>would be an improvement in several cases where currently floats are
>used, just like the motivation for Decimals. Only difference seems to
>be that there aren't so many or compelling use cases for rationals as
>for decimals (mainly money counting).
You've precisely hit on the problem: previous discussion about rationals
has bogged down because proponents insisted on making it a built-in type
rather than a library. If a PEP were submitted with code for a library,
there would be little trouble getting it accepted -- just like Decimal.
Even now, after a couple of releases with Decimal in the library, there
remains much opposition to a Decimal built-in, not even talking about
Decimal literals.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"Typing is cheap. Thinking is expensive." --Roy Smith
More information about the Python-list
mailing list