Turn off ZeroDivisionError?

Mark Dickinson dickinsm at gmail.com
Sun Feb 10 17:44:58 EST 2008


On Feb 10, 4:56 pm, Grant Edwards <gra... at visi.com> wrote:
> Exactly.  Espeically when Python supposedly leaves floating
> point ops up to the platform.

There's a thread at http://mail.python.org/pipermail/python-list/2005-July/329849.html
that's quite relevant to this discussion.  See especially the
exchanges between Michael
Hudson and Tim Peters in the later part of the thread.  I like this
bit, from Tim:

"I believe Python should raise exceptions in these cases by default,
because, as above, they correspond to the overflow and
invalid-operation signals respectively, and Python should raise
exceptions on the overflow, invalid-operation, and divide-by-0
signals
by default.  But I also believe Python _dare not_ do so unless it
also
supplies sane machinery for disabling traps on specific signals
(along
the lines of the relevant standards here).  Many serious numeric
programmers would be livid, and justifiably so, if they couldn't get
non-stop mode back.  The most likely x-platfrom accident so far is
that they've been getting non-stop mode in Python since its
beginning."

Mark



More information about the Python-list mailing list