Against PEP 240

Robin Becker robin at jessikat.fsnet.co.uk
Tue May 29 19:52:06 EDT 2001


In article <9f155606df at enews2.newsguy.com>, Alex Martelli
<aleaxit at yahoo.com> writes
>"Robin Becker" <robin at jessikat.fsnet.co.uk> wrote in message
>news:XLHUlFB4W$E7EwGh at jessikat.fsnet.co.uk...
>    ...
...
>Tradition and intra-language consistency point in different directions
>depending on what other languages you're considering.  Besides, I
>have oodles of code in languages "used for floating point arithmetic"
>that's FULL of decorated literals to specify single-precision or double
>precision -- it seems quite traditional for floating-point fans to decorate
>their literals with tasteful 'd', 'e', and/or 'f', not to speak 'l'
>sometime.

so then it ought to be easy for either side and then the default ought
to rest with the existing python tradition.

>> If we're forced to use 'f' or 'F' I don't mind. We can do double
>> precision in the same way ie use 'D'.

... the word here is 'forced' I don't want this and I don't  want an
easy way into possibly very large computations ie let's use rationals
and Newton's method to solve for a root of x^2 = 2

A naive user might expect an exact result.
...
>
>> The exponentiation notation can then be used by both rationals and
>> floats.
>
>I'd LOVE to be able to write 1e8 to mean 100000000, an int, rather
>than having to count zeros... but that may be because of the lira's
>notoriously low value, and in a bit more than 6 months we're gonna
>switch over to Euros worth 1936.27 liras, so the need may abate:-).

if we're allowed this notation it again allows very large computations
to be set up with ease eg (1.0e100000000-1)/pi

>> Are complex numbers, floats and rationals and ints to be freely mixable?
>
>I don't see why numeric types should be any less mixable if/when
>PEP 240 takes over than they are now.

if they are do we get to see/hook the various conversion methods.
 
>
>
>Alex
>
>
>

-- 
Robin Becker



More information about the Python-list mailing list