def Convert2Num(text):
    #convert to number if possible
    try:
        value = int(text, 10)
        return value
    except ValueError as ex:
        pass

    try:
        value = int(text, 16)
        return value
    except ValueError as ex:
        pass

    try:
        value = float(text)
        return value
    except ValueError as ex:
        pass

    try:
        value = complex(text)
        return value
    except ValueError as ex:
        pass

    raise ValueError("Expected Number got '{0}'".format(text))
    # return None
Stop consuming data.
dataset/ETHPy150Open ioflo/ioflo/ioflo/base/building.py/Convert2Num--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/abstract.py/FileDescriptor.stopConsuming