proposed language change to int/int==float (was: PEP0238 lament)

Guido van Rossum guido at
Fri Jul 27 17:43:51 EDT 2001

bokr at (Bengt Richter) writes:

> On Fri, 27 Jul 2001 08:54:13 -0400, Guido van Rossum <guido at> wrote:
> [...]
> >Assuming we'll adopt a variation of Scheme's numerical tower (which
> >I'm currently in favor of, more or less), this won't happen.  Floats
> >and complex would always be considered inexact (and ints and rationals
> >exact), and inexact numbers are not allowed as sequence indices, even
> >if their exact value is an integer.
> >
> Why would complex have to be inexact if both its
> real and imaginary parts were exact?
> This looks exact, but will it be?
>  >>> (1+2j)**2
>  (-3+4j)

Probably not -- I don't think it's worth to have a separate exact and
inexact complex numbers, especially since exact numbers will probably
be represented as rationals (with ints and long ints as a special-case
optimization), while inexact numbers will probably all use some form
of floating point (binary or decimal).

--Guido van Rossum (home page:

More information about the Python-list mailing list