def safe_float(obj):
    try:
        retval = float(obj)
    except ValueError:
        retval = 'could not convert non-number to float'
    except TypeError:
        retval = 'object type cannot be converted to float';
    finally:
        print 'finally...'
    return retval

print safe_float('a')

finally...
could not convert non-number to float