def check_float(string):
    try:
        float(string)
        return True
    except ValueError:
        return False
Helper function for checking if a string can be converted to a float.
dataset/ETHPy150Open openstack/swift/swift/common/constraints.py/check_float