def eval_source(source):
    """Return ``eval(source)`` with ``source`` attached as attribute.

    >>> eval_source("lambda: 'spam'")()
    'spam'

    >>> eval_source("lambda: 'spam'").source
    "lambda: 'spam'"
    """
    result = eval(source)
    result.source = source
    return result
