def _event_desc(event):
    """For debugging: user friendly representation of the event bitmask returned by poll()."""
    desc = ''
    first = True
    for t in ('POLLIN', 'POLLPRI', 'POLLOUT', 'POLLERR', 'POLLHUP', 'POLLNVAL'
        ):
        if event & globals()[t]:
            if not first:
                desc += '|'
            desc += t
            first = False
    return desc
