try()
wraps the expression evaluation in a try/catch and if an exception is caught uses the bailout value. Divide by None
will throw an exception, divide by 0
is infinity, no exception thrown.
Seems reasonable to me!
try()
wraps the expression evaluation in a try/catch and if an exception is caught uses the bailout value. Divide by None
will throw an exception, divide by 0
is infinity, no exception thrown.
Seems reasonable to me!