import six


def _ensure_list(alist):  # {{{
    """
    Ensure that variables used as a list are actually lists.
    """
    # Authors
    # -------
    # Phillip J. Wolfram, Xylar Asay-Davis

    if isinstance(alist, six.string_types):
        # print 'Warning, converting %s to a list'%(alist)
        alist = [alist]

    return alist