How about adding rational fraction to Python?

Paul Rubin http
Thu Feb 28 03:16:11 EST 2008


Marc 'BlackJack' Rintsch <bj_666 at gmx.net> writes:
> For implementing this in Python you have to carry an "is allowed to be
> coerced to float" flag with every integer object to decide at run time if
> it is an error to add it to a float or not.

Yeah, I guess it's not workable in a dynamic language.  Hmm.  Well I
could think of some crazy ways to do it.  

> Or you make Python into a statically typed language like Haskell.
> But then it's not Python anymore IMHO.

There are some languages like Boo, that are sort of halfway between
Python and Haskell, so maybe that kind of idea could be used in them.



More information about the Python-list mailing list