Comparison with Ruby ?

Emile van Sebille emile at fenx.com
Thu Feb 22 08:11:17 EST 2001


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:972lk10k0n at news2.newsguy.com...
> "Juergen Bocklage" <juergen.bocklage at gmx.net> wrote in
message
> news:3A94489D.5B65ED19 at gmx.net...
<snip>
> >      Ruby converts small integers and long integers
automatically.
> > JB> Okay, nice for you
>
> No way.  Explicit is better than implicit.  I'd rather NOT
> have such 'automatic' (automagick) conversions anywhere!
>

What *magic* requires my attention between 2147483647 and
2147483648?  I'd rather have a single type for a python
number, and let C do what it needs to do to allow it.

I learned a long time ago to store monetary values as whole
numbers in order to avoid rounding and precision related
problems.  Here, that means that the maximum value a sum of
numbers can have is $21,474,836.47.  On a trial balance
where you add up the debits for the period, even small
companies hit this limit quickly.  This simply means that
all monetary values must be longs and is certainly not a
problem, but I'd much prefer not having to think of it.

--

Emile van Sebille
emile at fenx.com
-------------------







More information about the Python-list mailing list