def variants(obj, event):
    """Get a generator that yields variations of a event."""
    if hasattr(event, 'parameters'):
        parent = event.parent
        l = len(event.parameters)
        for i in range(l + 1):
            sig, _ = parent.parameterise(event.parameters[:l - i])
            yield sig.__get__(obj)
    else:
        yield event
        if hasattr(event, 'name'):
            yield event.name
