Changing the Division Operator -- PEP 238, rev 1.12

Tim Peters tim.one at home.com
Mon Aug 6 01:00:28 EDT 2001


[Mark Day, in reference to
 <http://groups.google.com/groups?hl=en&safe=off&th=1d9d3c24ba2f933d>]
> ... But what struck me was that when a non-programmer came to a
> Python discussion list asking whether Python was suitable for his
> project, several people warning him about the pitfalls of division (and
> not much else).

As Arthur (thank you!) said later, the bulk of the thread was about
cautions appropriate when writing life-critical apps, and mostly about
floating point.

You may have missed (although I don't see how <wink>) that in his initial
msg, the pharmacist said his apps were "very math oriented", and that he had
been using:

1. Programs written in Basic

and cross-checking them against

2. a TI 85 calculator

and

3. hand calculations.

and he didn't display signs of familiarity with other systems.  Since all of
those return 0.5 for 1/2, he had to be made acutely aware that Python
numerics act radically different in this one respect.  Indeed, given the
context, that was the single most important thing for him to know about
Python at the start!  Unless you'd like him to compute *your* prescription
using a naively ported old Basic program?

didn't-think-so-me-neither-ly y'rs  - tim





More information about the Python-list mailing list