On Sat, Mar 27, 2010 at 12:39 PM, Mark Dickinson firstname.lastname@example.org wrote:
How about default behaviour like the above, with a "from __options__ import non-stop-arithmetic" for people who want 1./0. to give infinity and sqrt(-1) to give nan?
Hmm. That would be a horrible way to control the option. But the idea's the same: give some way to enable non-stop arithmetic.
Some sort of context manager might make sense:
with non_stop_arithmetic: result = calculation() if isnan(result): ...