First time here? Check out the FAQ!
answered 2010-12-08 19:14:32 +0100
Something like this:
def temp(x): try: return 3/x except ZeroDivisionError: return False
Then
sage: temp(2) 3/2 sage: temp(0) False