'Support decorator syntax:
>>> @signal.connect(sender=type)
>>> def my_receiver(**kwargs):
>>>     pass'

def connect(self, receiver=None, **kwargs):

    def wrapped(func):
        return super(BetterSignal, self).connect(func, **kwargs)
    if (receiver is None):
        return wrapped
    if hasattr(receiver, '__name__'):
        wrapped.__name__ = receiver.__name__
    if hasattr(receiver, '__module__'):
        wrapped.__module__ = receiver.__module__
    if hasattr(receiver, '__doc__'):
        wrapped.__doc__ = receiver.__doc__
    return wrapped(receiver)
