def detail_line(e):
    """Given an expectation, return a readable one-line explanation of it."""
    fields = [fname for fname in ('mutable', 'optional', 'volatile')
              if getattr(e, fname, None)]

    if e.depends_on:
        fields.append("depends_on=%s" % e.depends_on)

    line = ', '.join(fields)
    if line:
        line = "*(%s)*" % line

    return line