How about adding rational fraction to Python?
Jeff Schwab
jeff at schwabcenter.com
Sat Feb 16 17:51:15 EST 2008
Carl Banks wrote:
> On Feb 16, 3:03 pm, Lie <Lie.1... at gmail.com> wrote:
>> Although rationals have its limitations too, it is a much
>> better choice compared to floats/Decimals for most cases.
>
> Maybe that's true for your use cases, but it's not true for most cases
> in general.
>
> Rationals are pretty useless for almost any extended calculations,
> since the denominator tends to grow in size till it's practically
> unusbale,
What do you mean by "practically unusable?" I heard similar arguments
made against big integers at one point ("Primitive types are usually big
enough, why risk performance?") but I fell in love with them when I
first saw them in Smalltalk, and I'm glad Python supports them natively.
More information about the Python-list
mailing list