(var, value)
Used during typing to check that variable var was resolved as Python type and has specific value
Used during typing to check that variable var was resolved as Python type and has specific value
Used during typing to check that variable var was resolved as Python type and has specific value
def has_python_value(var, value):
    """Used during typing to check that variable var was resolved as Python type and has specific value"""

    if not isinstance(var, type(value)):
        return False

    if value is None or isinstance(value, type(bool)):
        return var is value
    else:
        return var == value
def has_python_value ( var , value ) : if not isinstance ( var , type ( value ) ) : return False if value is None or isinstance ( value , type ( bool ) ) : return var is value else : return var == value