(var, value)
Used during typing to check that variable var is a Numba literal value equal to value
Used during typing to check that variable var is a Numba literal value equal to value
Used during typing to check that variable var is a Numba literal value equal to value
def has_literal_value(var, value):
    """Used during typing to check that variable var is a Numba literal value equal to value"""

    if not isinstance(var, types.Literal):
        return False

    if value is None:
        return isinstance(var, types.NoneType) or var.literal_value is value
    elif isinstance(value, type(bool)):
        return var.literal_value is value
    else:
        return var.literal_value == value
def has_literal_value ( var , value ) : if not isinstance ( var , types . Literal ) : return False if value is None : return isinstance ( var , types . NoneType ) or var . literal_value is value elif isinstance ( value , type ( bool ) ) : return var . literal_value is value else : return var . literal_value == value