(variable)
Return a list of sorted values for given attribute, if all its values can be
    cast to int's.
Return a list of sorted values for given attribute, if all its values can be
    cast to int's.
Return a list of sorted values for given attribute if all its values can be cast to int s .
def get_variable_values_sorted(variable):
    """
    Return a list of sorted values for given attribute, if all its values can be
    cast to int's.
    """
    if variable.is_continuous:
        return []
    try:
        return sorted(variable.values, key=int)
    except ValueError:
        return variable.values
def get_variable_values_sorted ( variable ) : if variable . is_continuous : return [ ] try : return sorted ( variable . values , key = int ) except ValueError : return variable . values