About Rational Number (PEP 239/PEP 240)

greg greg at cosc.canterbury.ac.nz
Sat Dec 15 18:52:48 EST 2007


I think the main objection to rationals is that extensive
computation with them tends to result in numbers requiring
larger and larger amounts of storage. I believe that ABC
made routine use of rationals, and this caused programs
to get bogged down for no apparent reason, as rationals
were being used behind the scenes when people didn't
realise it.

So while rationals might be useful to have available for
some things, you should have to explicitly ask for them.
Returning rationals from '/' applied to integers would
be a bad idea, for example.

--
Greg



More information about the Python-list mailing list