The Magic of Maybe The Pattern Consider the following code def do_some_stuff(x) try: val = f(x) except NameError, e: val = False return va;