This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients barry, ncoghlan, rhettinger, skrah, vstinner, zero.piraeus
Date 2013-10-16.10:18:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381918726.42.0.914714932374.issue19266@psf.upfronthosting.co.za>
In-reply-to
Content
trap() is a bit ambiguous, since in floating point operations it
means that something is actually raised and not suppressed. So one
could write:

from decimal import *
c = getcontext()
c.traps[Inexact] = True
>>> Decimal(9) / 11 # raises now!

with trap(Inexact):
    Decimal(9) / 11 # quiet!



As for "ignore" vs. "suppress", I'm with the people who think that they
are largely synonyms here.  I find "ignore" slightly catchier and nicer
to read.  Being pedantic, one could call it "ignore_once".

I would also like "catch", or pedantically, "catch_once".
History
Date User Action Args
2013-10-16 10:18:46skrahsetrecipients: + skrah, barry, rhettinger, ncoghlan, vstinner, zero.piraeus
2013-10-16 10:18:46skrahsetmessageid: <1381918726.42.0.914714932374.issue19266@psf.upfronthosting.co.za>
2013-10-16 10:18:46skrahlinkissue19266 messages
2013-10-16 10:18:46skrahcreate