proposed language change to int/int==float (was: PEP0238 lament)
tdickenson at devmail.geminidataloggers.co.uk
Wed Jul 25 09:34:56 CEST 2001
Guido van Rossum <guido at python.org> wrote:
>"Bjorn Pettersen" <BPettersen at NAREX.com> writes:
>> I think perhaps an equally interesting example is something like:
>> which currently gives an exact result, but under the proposed new
>> semantics would give an approximation...
>Have you read the PEP? The PEP only returns a float if the int result
>would yield a remainder.
That bit of the PEP didnt register on a first reading, and now I am
suprised at that rule.
As I understand it, this means long/long would sometimes give an exact
result and sometimes an approximation, depending on whether the
remainder is zero.
The problem isnt quite as simple as Bjorn was suggesting, but this is
1071508607186267320948425.... <more digits snipped>
1148130695274254524232833.... <more digits snipped>
tdickenson at geminidataloggers.com
More information about the Python-list