ngamsCore.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ngas 作者: ICRAR 项目源码 文件源码
def ignoreValue(ignoreEmptyField,
                fieldValue):
    """
    Evaluate the value of a field and indicate whether to ignore it or not.

    Internal function.

    ignoreEmptyField:     If set to 1 indicates that the field should be
                          ignored if it is an empty string (integer/0|1).

    fieldValue:           Value of field (string).

    Returns:              1 if field should be ignored, otherwise 0
                          (integer/0|1).
    """
    if (type(fieldValue) == types.IntType):
        if (ignoreEmptyField and (fieldValue == -1)): return 1
    elif (ignoreEmptyField and (str(fieldValue).strip() == "")):
        return 1
    return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号