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

Guido van Rossum guido at python.org
Thu Jul 26 18:03:11 EDT 2001


grante at visi.com (Grant Edwards) writes:

> If the numerical types all get unified, then I think one would
> expect an inexact number to get "converted" to an exact one if
> used in that context.

There are no exact and inexact contexts.  There are only exact and
inexact operations.  An exact operation yields an exact result iff all
its inputs are exact, otherwise it yields an inexact result.  +, -, *
are examples of exact operations; / is exact if you allow a rational
result.  But inexact+exact gives an inexact result.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list