How about adding rational fraction to Python?

Arnaud Delobelle arnodel at googlemail.com
Fri Feb 29 17:51:28 EST 2008


On Feb 29, 10:10 pm, "Terry Reedy" <tjre... at udel.edu> wrote:
> "Arnaud Delobelle" <arno... at googlemail.com> wrote in message
>
> | What screws me is that I'm going to have to type p//q in the future.
>
> When I compare that pain to the gain of not having to type an otherwise
> extraneous 'float(...)', and the gain of disambiguating the meaning of a/b
> (for builtin numbers at least), I think there will be a net gain for the
> majority.

You may be right.  I can see the rationale for this change (although
many aspects feel funny, such as doing integral arithmetic with
floats, i.e. 3.0//2.0).

Perhaps it'll be like when I quit smoking six years ago.  I didn't
enjoy it although I knew it was good for me... And now I don't regret
it even though I still have the occasional craving.

--
Arnaud




More information about the Python-list mailing list