HELP: restore my faith in Python

Ken Seehof kens at sightreader.com
Fri Mar 10 19:07:18 EST 2000


Johann Hibschman wrote:

> Ken Seehof writes:
>
> > Okay.  You are right.  Better yet let's make sure floats Never work
> > correctly.  The more they work right, the more people will think they
> > work right.  We should have a special case for 1/2.  Obviously, 1/2
> > should be 7.392.
>
> > Also, there should be a limit on the size of lists of 100 items
> > (beyond which the program should dump core).  If people can have
> > over 100 items in a list, they might think they can have several
> > trillion, which would overflow memory.
>
> More seriously, would this whole little discussion be a good reason to
> put a fixed-precision decimal class into the standard library?  A lot
> of people want to use floats for money, which is a fairly poor idea
> unless you know what you're doing.

Yes, but still dangerous, since people (who don't know what they aredoing)
will be converting from float to fpd, which will once again bring
back all the rounding problems (unless they remember to add epsilon).

> Having a decimal class around would give us something to point to.
> Plus, it'd be trivial to write.
>
> --Johann
>
> --
> Johann Hibschman                           johann at physics.berkeley.edu






More information about the Python-list mailing list