import copy


def selfless(variables):
    """
    Returns a copy of a dict of variables, without ``self`` in it.

    Args:
        variables (dict or callable): named variables
    """
    if not isinstance(variables, dict)\
            and hasattr(variables,'__call__'):
        variables = variables()
    variables = copy.copy(variables)
    try:
        variables.pop('self')
    except KeyError:
        pass
    return variables