(tup)
return True
Takes (name, object) tuple, returns True if it is a variable.
Takes (name, object) tuple, returns True if it is a variable.
Takes ( name object ) tuple returns True if it is a variable .
def is_variable(tup):
    """ Takes (name, object) tuple, returns True if it is a variable.
    """
    name, item = tup
    if callable(item):
        # function or class
        return False

    if isinstance(item, types.ModuleType):
        # imported module
        return False

    if name.startswith("_"):
        # private property
        return False

    return True
def is_variable ( tup ) : name , item = tup if callable ( item ) : # function or class return False if isinstance ( item , types . ModuleType ) : # imported module return False if name . startswith ( "_" ) : # private property return False return True