Perl is worse!
Alex Martelli
alex at magenta.com
Fri Jul 28 11:40:08 EDT 2000
"Grant Edwards" <ge at nowhere.none> wrote in message
news:yTgg5.2647$6E.682215 at ptah.visi.com...
> In article <398178EA.7576E13A at hursley.ibm.com>, Paul Duffin wrote:
> >Moshe Zadka wrote:
> >>
> >> Because numbers are numbers and strings are not. Given, Python's
numeric
> >> model is not very good.
> >
> >What is wrong with Python's numeric model ?
>
> I may be a minority, but I don't like integers being converted
> to floats automatically.
I have no problem with that _if it wastes NO information in so
doing_. I believe that on typical machines of today (32-bit
integers, 64-bit IEEE floating point) this can be guaranteed
*for integers*. *LONG* integers are another matter...! And
as I mentioned I think the rational solution to that problem is
not to forbid numeric promotions but to ensure they never
lead to information-loss by introducing the 'rational' type (a
couple of long-integers taken as num/denom of a fraction).
[That's why it's the *rational* solution:-)].
Alex
More information about the Python-list
mailing list