| 1 | initial version |
Something like this:
def temp(x):
try:
return 3/x
except ZeroDivisionError:
return False
Then
sage: temp(2)
3/2
sage: temp(0)
False
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.